1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
Former-commit-id: 953df27468e3905e557bb1f6a97ea431cb60f6a6
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-07-06 19:08:02 +03:00
parent dd72a1e398
commit 38b0a796bd
6 changed files with 85 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ func (b *Broker) ServeHTTP(ctx iris.Context) {
b.newClients <- messageChan
// Listen to connection close and when the entire request handler chain exits(this handler here) and un-register messageChan.
ctx.OnClose(func() {
ctx.OnClose(func(iris.Context) {
// Remove this client from the map of connected clients
// when this handler exits.
b.closingClients <- messageChan