MCPcopy Create free account
hub / github.com/abi/screenshot-to-code / close

Method close

backend/routes/generate_code.py:235–247  ·  view source on GitHub ↗

Close the WebSocket connection

(self)

Source from the content-addressed store, hash-verified

233 return params
234
235 async def close(self) -> None:
236 """Close the WebSocket connection"""
237 if not self.is_closed:
238 try:
239 await self.websocket.close()
240 except (
241 ConnectionClosedOK,
242 ConnectionClosedError,
243 RuntimeError,
244 WebSocketDisconnect,
245 ):
246 pass # Already closed by client
247 self.is_closed = True
248
249
250@dataclass

Callers 3

throw_errorMethod · 0.45
processMethod · 0.45

Calls

no outgoing calls