zhaojh329/rttys

ubuntu系統下服務端websocket多綫程崩潰bug

tymaker opened this issue · 0 comments

panic: concurrent write to websocket connection

goroutine 40 [running]:
github.com/gorilla/websocket.(*messageWriter).flushFrame(0xc000075750, 0x10f1001, 0x10f10d0, 0x0, 0x0, 0x438985, 0xca7960)
/home/zjh/go/pkg/mod/github.com/gorilla/websocket@v1.4.1/conn.go:610 +0x60e
github.com/gorilla/websocket.(*Conn).WriteMessage(0xc0001c06e0, 0x9, 0x10f10d0, 0x0, 0x0, 0x0, 0x0)
/home/zjh/go/pkg/mod/github.com/gorilla/websocket@v1.4.1/conn.go:763 +0x238
main.(*user).WriteMsg(...)
/home/zjh/rttys/user.go:52
main.(*user).keepAlive(0xc00008ab40)
/home/zjh/rttys/user.go:74 +0x65
created by main.serveUser
/home/zjh/rttys/user.go:119 +0x21b

軟體版本:rttys version 3.3.1
系統版本:Linux 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux