Do not timeout when WriteControl deadline is zero

A zero value for the Conn.WriteControl deadline specifies no timeout,
but the feature was implemented as a very long timeout (1000 hours).
This PR updates the code to use no timeout when the deadline is zero.

See the discussion in #895 for more details.
2 files changed
tree: 559036dc4032fc3a18c11a6ecc39de1e7e30e100
  1. .circleci/
  2. .github/
  3. examples/
  4. .gitignore
  5. AUTHORS
  6. client.go
  7. client_server_test.go
  8. client_test.go
  9. compression.go
  10. compression_test.go
  11. conn.go
  12. conn_broadcast_test.go
  13. conn_test.go
  14. doc.go
  15. example_test.go
  16. go.mod
  17. go.sum
  18. join.go
  19. join_test.go
  20. json.go
  21. json_test.go
  22. LICENSE
  23. mask.go
  24. mask_safe.go
  25. mask_test.go
  26. prepared.go
  27. prepared_test.go
  28. proxy.go
  29. README.md
  30. server.go
  31. server_test.go
  32. util.go
  33. util_test.go
README.md

Gorilla WebSocket

GoDoc CircleCI

Gorilla WebSocket is a Go implementation of the WebSocket protocol.

Documentation

Status

The Gorilla WebSocket package provides a complete and tested implementation of the WebSocket protocol. The package API is stable.

Installation

go get github.com/gorilla/websocket

Protocol Compliance

The Gorilla WebSocket package passes the server tests in the Autobahn Test Suite using the application in the examples/autobahn subdirectory.