Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 386e05a

Browse files
committed
wsconn close
1 parent 0c2b5f1 commit 386e05a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/http/controller/websocket.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func (this *WebsocketController) RegisterRoute(g *echo.Group) {
3131
// websocket,统计在线用户数
3232
// uri: /ws
3333
func (this *WebsocketController) Ws(wsConn *websocket.Conn) {
34+
defer wsConn.Close()
35+
3436
this.mutex.Lock()
3537
this.ServerId++
3638
serverId := this.ServerId

0 commit comments

Comments
 (0)