golive
golive copied to clipboard
panic upon closing todo window
Steps taken:
- cd examples/todo
- go build
- ./todo
- Open http://127.0.0.1:3000 in a browser window
- Close the window.
Expected: The server keeps running.
Actual: The server crashes like this:
GL 21:20:52 WRN handle ws request: unexpected connection close
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13eabf1]
goroutine 52 [running]:
github.com/fasthttp/websocket.(*Conn).Close(...)
/Users/issactrotts/pkg/mod/github.com/fasthttp/[email protected]/conn.go:344
github.com/brendonmatos/golive.(*LiveServer).HandleWSRequest.func2()
/Users/issactrotts/src/github.com/brendonmatos/golive/server.go:196 +0x471
created by github.com/brendonmatos/golive.(*LiveServer).HandleWSRequest
/Users/issactrotts/src/github.com/brendonmatos/golive/server.go:182 +0x305