Execute websocket handlers as goroutines. Bumped to 0.2.17

This commit is contained in:
Magnus Åhall 2024-07-30 07:44:08 +02:00
parent 256dda9a48
commit 53efcaedc9
2 changed files with 2 additions and 2 deletions

2
pkg.go
View File

@ -64,7 +64,7 @@ import (
"strings" "strings"
) )
const VERSION = "v0.2.14" const VERSION = "v0.2.17"
type HttpHandler func(http.ResponseWriter, *http.Request) type HttpHandler func(http.ResponseWriter, *http.Request)

View File

@ -117,7 +117,7 @@ func (cm *ConnectionManager) ReadLoop(wsConn *WsConnection) { // {{{
cm.logger.Debug("websocket", "op", "read", "data", data) cm.logger.Debug("websocket", "op", "read", "data", data)
for _, handler := range cm.readHandlers { for _, handler := range cm.readHandlers {
handler(cm, wsConn, data) go handler(cm, wsConn, data)
} }
} }
} // }}} } // }}}