Skip to content

Commit b56cbd8

Browse files
dont close channel on Unsubscribe
1 parent cd5d2bc commit b56cbd8

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

graphql/subscription.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package graphql
22

33
import (
44
"fmt"
5-
"reflect"
65
"sync"
76
)
87

@@ -37,13 +36,8 @@ func (s *subscriptionMap) Unsubscribe(subscriptionID string) error {
3736
if !success {
3837
return fmt.Errorf("tried to unsubscribe from unknown subscription with ID '%s'", subscriptionID)
3938
}
40-
hasBeenUnsubscribed := unsub.hasBeenUnsubscribed
4139
unsub.hasBeenUnsubscribed = true
4240
s.map_[subscriptionID] = unsub
43-
44-
if !hasBeenUnsubscribed {
45-
reflect.ValueOf(s.map_[subscriptionID].interfaceChan).Close()
46-
}
4741
return nil
4842
}
4943

0 commit comments

Comments
 (0)