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

panic upon closing todo window #34

@ijt

Description

@ijt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions