fix: update peer info on duplicate initialize (#862)
This commit is contained in:
parent
2d3d1879ad
commit
2536a05992
1 changed files with 69 additions and 12 deletions
|
|
@ -184,9 +184,7 @@ macro_rules! server_handler_methods {
|
|||
request: InitializeRequestParams,
|
||||
context: RequestContext<RoleServer>,
|
||||
) -> impl Future<Output = Result<InitializeResult, McpError>> + MaybeSendFuture + '_ {
|
||||
if context.peer.peer_info().is_none() {
|
||||
context.peer.set_peer_info(request);
|
||||
}
|
||||
context.peer.set_peer_info(request);
|
||||
std::future::ready(Ok(self.get_info()))
|
||||
}
|
||||
fn complete(
|
||||
|
|
|
|||
Loading…
Reference in a new issue