We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b2e93b commit 26f7f84Copy full SHA for 26f7f84
1 file changed
graphql/websocket.go
@@ -121,8 +121,9 @@ func (w *webSocketClient) listenWebSocket() {
121
// interfaceChan's are closed at the top of listenWebSocket to
122
// guarantee the channels are closed even if listenWebSocket will exit.
123
w.subscriptions.forEachSubscription(func(sub *subscription) {
124
- if sub.hasBeenUnsubscribed() {
+ if sub.hasBeenUnsubscribed() && sub.interfaceChan != nil {
125
reflect.ValueOf(sub.interfaceChan).Close()
126
+ sub.interfaceChan = nil
127
}
128
})
129
if w.isClosing {
0 commit comments