grpc-websocket-proxy icon indicating copy to clipboard operation
grpc-websocket-proxy copied to clipboard

fix: set write deadline before writing messages

Open alvarowolfx opened this issue 3 years ago • 0 comments

I was having some weird behavior here when I set up ping/pong to keep the connection alive, where even with that, I was getting disconnected after some time.

Them I checked gorilla/websocket sample on how to keep the connection alive and noticed that their base samples resets the WriteDeadline on every write, this way keeping the connection alive. https://github.com/gorilla/websocket/blob/master/examples/chat/client.go#L91

So this commit added that behavior.

alvarowolfx avatar Nov 24 '21 22:11 alvarowolfx