We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 347b2e6 commit c55e126Copy full SHA for c55e126
mcp_proxy_for_aws/proxy.py
@@ -106,6 +106,13 @@ async def _connect(self):
106
raise McpError(error=jsonrpc_msg.error) from http_error
107
else:
108
raise http_error
109
+ except RuntimeError:
110
+ try:
111
+ logger.warning('encountered runtime error, try force disconnect.')
112
+ await self._disconnect(force=True)
113
+ except Exception:
114
+ logger.warning('encountered another error, raising the previous runtime error.')
115
+ return await self._connect()
116
117
async def __aexit__(self, exc_type, exc_val, exc_tb):
118
"""The MCP Proxy for AWS project is a proxy from stdio to http (sigv4).
0 commit comments