Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

panic upon closing todo window #34

Open
ijt opened this issue Sep 29, 2021 · 0 comments
Open

panic upon closing todo window #34

ijt opened this issue Sep 29, 2021 · 0 comments

Comments

@ijt
Copy link

ijt commented Sep 29, 2021

Steps taken:

  1. cd examples/todo
  2. go build
  3. ./todo
  4. Open http://127.0.0.1:3000 in a browser window
  5. 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
@ijt ijt changed the title panic when opening second window on todo example panic upon closing todo window Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant