MCPcopy
hub / github.com/open-webui/mcpo / reconnect

Method reconnect

src/mcpo/main.py:113–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

111 return session, initialize_result
112
113 async def reconnect(self):
114 async with self._lock:
115 await self._close_session_locked()
116 await self._open_session_locked()
117 # Run initialize outside of the lock to avoid deadlocks on nested calls
118 return await self.ensure_initialized()
119
120 async def close(self):
121 async with self._lock:

Callers 1

call_tool_with_reconnectFunction · 0.80

Calls 3

_close_session_lockedMethod · 0.95
_open_session_lockedMethod · 0.95
ensure_initializedMethod · 0.95

Tested by

no test coverage detected