Skip to content

Commit 0b086f8

Browse files
committed
fixes the issue #7
1 parent d48a006 commit 0b086f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ func WSHandler(c echo.Context) error {
7272
select {
7373
case <-closeCh:
7474
closed = true
75-
close(closeCh)
7675
Broker.Detach(subscriber)
7776
TriggerWebhook(Event{Action: "disconnect", Key: key})
7877
case data := <-subscriber.GetMessages():
@@ -112,7 +111,7 @@ func goRoutineAction(conn *websocket.Conn, closeCh chan bool, subscriber *pubsub
112111
Broker.Unsubscribe(subscriber, action.Value)
113112
}
114113
}
115-
closeCh <- true
114+
close(closeCh)
116115
})()
117116
}
118117

0 commit comments

Comments
 (0)