Replies: 1 comment
-
Based on the linked issue, as tiangelo pointed out the response is not handled at the application level (ie. in your FastAPI code). In this case you do nothing. Uvicorn (or whatever asgi server) is responsible for returning the pong message. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Privileged issue
Issue Content
I just read #626, and it seems like handling ping was discussed and resolved, but nothing was mentioned around sending a ping out to a client. I believe that would test the connection and allow a WebsocketDiscconnect exception to be thrown allowing the connection to be cleaned up. It seems though that the websocket I'm referencing doesn't expose a
.conn
attribute so I don't understand how to send a ping. Could someone provide a more explicit explanation around invoking websocket ping from the server to validate connections?Beta Was this translation helpful? Give feedback.
All reactions