tmc / grpc-websocket-proxy

A proxy to transparently upgrade grpc-gateway streaming endpoints to use websockets
MIT License
553 stars 72 forks source link

Make inMemoryResponseWriter implement CloseNotifier #9

Closed jfhamlin closed 7 years ago

jfhamlin commented 7 years ago

With no way to notify the RPC when the client connection has dropped, a backend connection will be held until the backend server sends its next response. This PR implements CloseNotifier, which allows grpc-gateway to cancel the RPC instead.

It also fixes a copy-paste error in WithTokenCookieName.

jfhamlin commented 7 years ago

@tmc, pinging on a review. This change fixes something that can turn into a pesky connection leak. Thanks!

tmc commented 7 years ago

@jfhamlin thanks for your contribution! reviewing now!