Skip to content

Closing ws early triggers false positive "hijacked connection" logs #212

@mcandre

Description

@mcandre

Trace

2017/02/07 13:38:17 http: response.WriteHeader on hijacked connection
2017/02/07 13:38:17 http: response.Write on hijacked connection

Steps to Reproduce

  1. Run a net/http server with a handler upgrading to a WebSocket.
  2. Launch a connection to the server, such as with github.com/raphael/wsc.
  3. Launch a second connection.
  4. Terminate the second connection from the client side (Control+C).
  5. The server will report "hijacked connection".
  • Am I likely doing something wrong?
  • Do gorilla/websocket users need to do anything special to cleanly release resources, close connections, etc.?
  • Is this a bug in how gorilla/websocket integrates with net/http?
  • Is this a bug in net/http's default session hijacking detection?

System

Go 1.7
macOS Sierra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions