Remove optional check
This commit is contained in:
parent
fd826cc7a6
commit
9d65e5ac03
1 changed files with 0 additions and 6 deletions
|
|
@ -42,12 +42,6 @@ async def websocket_client(url: str) -> AsyncGenerator[
|
||||||
|
|
||||||
# Connect using websockets, requesting the "mcp" subprotocol
|
# Connect using websockets, requesting the "mcp" subprotocol
|
||||||
async with ws_connect(url, subprotocols=[Subprotocol("mcp")]) as ws:
|
async with ws_connect(url, subprotocols=[Subprotocol("mcp")]) as ws:
|
||||||
# Optional check to ensure the server actually accepted "mcp"
|
|
||||||
if ws.subprotocol != "mcp":
|
|
||||||
raise ValueError(
|
|
||||||
f"Server did not accept subprotocol 'mcp'. Actual subprotocol: {ws.subprotocol}"
|
|
||||||
)
|
|
||||||
|
|
||||||
async def ws_reader():
|
async def ws_reader():
|
||||||
"""
|
"""
|
||||||
Reads text messages from the WebSocket, parses them as JSON-RPC messages,
|
Reads text messages from the WebSocket, parses them as JSON-RPC messages,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue