-
Couldn't load subscription status.
- Fork 27
Open
Description
got an error:
HAndling chat request
2018/03/08 15:22:47 http: panic serving [::1]:57392: runtime error: invalid memory address or nil pointer dereference
goroutine 3 [running]:
net/http.(*conn).serve.func1(0xc420104000)
/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x127de40, 0x1413a20)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/gorilla/websocket.(*Conn).NextReader(0x0, 0xc420032b08, 0x10c79f7, 0x13ed5e0, 0xc42008e008, 0xc420032b08)
/Users/jintian/go/src/github.com/gorilla/websocket/conn.go:930 +0x26
github.com/gorilla/websocket.(*Conn).ReadJSON(0x0, 0x1276d80, 0xc420077080, 0xc42000a600, 0x0)
/Users/jintian/go/src/github.com/gorilla/websocket/json.go:50 +0x2f
_/Volumes/xs/lans/space_go/mine/sparrow/chat.(*Server).handleChat(0xc4200a0320, 0x13f11e0, 0xc420108000, 0xc42000a600)
/Volumes/xs/lans/space_go/mine/sparrow/chat/server.go:120 +0x142
_/Volumes/xs/lans/space_go/mine/sparrow/chat.(*Server).(_/Volumes/xs/lans/space_go/mine/sparrow/chat.handleChat)-fm(0x13f11e0, 0xc420108000, 0xc42000a600)
/Volumes/xs/lans/space_go/mine/sparrow/chat/server.go:87 +0x48
net/http.HandlerFunc.ServeHTTP(0xc42006f0b0, 0x13f11e0, 0xc420108000, 0xc42000a600)
/usr/local/go/src/net/http/server.go:1942 +0x44
net/http.(*ServeMux).ServeHTTP(0x141cc80, 0x13f11e0, 0xc420108000, 0xc42000a600)
/usr/local/go/src/net/http/server.go:2238 +0x130
net/http.serverHandler.ServeHTTP(0xc4200b42c0, 0x13f11e0, 0xc420108000, 0xc42000a600)
/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc420104000, 0x13f16a0, 0xc420014200)
/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2668 +0x2ce
Metadata
Metadata
Assignees
Labels
No labels