Websocket write doesn't fail even if the network connection is broken

36 Views Asked by At

I have a websocket connection to another server in a different network and I keep sending data to it using the gorilla websocket lib's WriteMessage method. https://github.com/gorilla/websocket/blob/main/conn.go#L768

But when the network connection is broken, say the route is lost, this method doesn't report any error and the data is lost quietly. Is there a way to address this issue?

0

There are 0 best solutions below