koding / websocketproxy

WebSocket reverse proxy handler for Go
http://godoc.org/github.com/koding/websocketproxy
MIT License
427 stars 120 forks source link

Add support for websocket connection cancellation via Shutdown() method #24

Open ttjiaa opened 6 years ago

ttjiaa commented 6 years ago

This PR adds support for closing of proxied websocket connections via a Shutdown(ctx context.Context) error method.

This is useful in the case where the service handling the proxied connections is shutting down, and we want to gracefully disconnect the websocket connections.