Execute websocket handlers as goroutines. Bumped to 0.2.17
This commit is contained in:
parent
256dda9a48
commit
53efcaedc9
2
pkg.go
2
pkg.go
@ -64,7 +64,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const VERSION = "v0.2.14"
|
||||
const VERSION = "v0.2.17"
|
||||
|
||||
type HttpHandler func(http.ResponseWriter, *http.Request)
|
||||
|
||||
|
@ -117,7 +117,7 @@ func (cm *ConnectionManager) ReadLoop(wsConn *WsConnection) { // {{{
|
||||
cm.logger.Debug("websocket", "op", "read", "data", data)
|
||||
|
||||
for _, handler := range cm.readHandlers {
|
||||
handler(cm, wsConn, data)
|
||||
go handler(cm, wsConn, data)
|
||||
}
|
||||
}
|
||||
} // }}}
|
||||
|
Loading…
Reference in New Issue
Block a user