-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
by blake.mizerany:
Per email from Brad: It looks like what you don't actually care about owning the TCP connection and ideally just want something like: var clientClosed chan bool cn, ok := w.(http.CloseNotifier) if ok { clientClosed = cn.CloseChannel() // returns a chan bool, written to when/if this http request is closed } select { case <-clientClosed: // cancel expensive stuff case .... } https://groups.google.com/d/topic/golang-nuts/PcEvewBB-AQ/discussion