-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
conn.go: default close handler should not return ErrCloseSent. #865
Merged
coreydaley
merged 2 commits into
gorilla:main
from
pnx:fix-default-close-handler-return-error
Nov 13, 2023
Merged
conn.go: default close handler should not return ErrCloseSent. #865
coreydaley
merged 2 commits into
gorilla:main
from
pnx:fix-default-close-handler-return-error
Nov 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@coreydaley can you take a look at this? |
Codecov Report
@@ Coverage Diff @@
## main #865 +/- ##
==========================================
+ Coverage 69.99% 70.20% +0.20%
==========================================
Files 11 11
Lines 1593 1594 +1
==========================================
+ Hits 1115 1119 +4
+ Misses 364 362 -2
+ Partials 114 113 -1
|
coreydaley
approved these changes
Nov 13, 2023
algitbot
pushed a commit
to alpinelinux/build-server-status
that referenced
this pull request
Sep 15, 2024
This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/gorilla/websocket](https://github.com/gorilla/websocket) | require | patch | `v1.5.1` -> `v1.5.3` | --- ### Release Notes <details> <summary>gorilla/websocket (github.com/gorilla/websocket)</summary> ### [`v1.5.3`](https://github.com/gorilla/websocket/releases/tag/v1.5.3) [Compare Source](gorilla/websocket@v1.5.2...v1.5.3) #### Important change This reverts the websockets package back to gorilla/websocket@931041c #### What's Changed - Fixes subprotocol selection (aling with rfc6455) by [@​KSDaemon](https://github.com/KSDaemon) in gorilla/websocket#823 - Update README.md, replace master to main by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#862 - Use status code constant by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#864 - conn.go: default close handler should not return ErrCloseSent. by [@​pnx](https://github.com/pnx) in gorilla/websocket#865 - fix: replace ioutil.readfile with os.readfile by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#868 - fix: add comment for the readBufferSize and writeBufferSize by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#869 - Remove noisy printf in NextReader() and beginMessage() by [@​bcreane](https://github.com/bcreane) in gorilla/websocket#878 - docs(echoreadall): fix function echoReadAll comment by [@​XdpCs](https://github.com/XdpCs) in gorilla/websocket#881 - make tests parallel by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#872 - Upgrader.Upgrade: use http.ResposnseController by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#871 - Do not handle network error in `SetCloseHandler()` by [@​nak3](https://github.com/nak3) in gorilla/websocket#863 - perf: reduce timer in write_control by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#879 - fix: lint example code by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#890 - feat: format message type by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#889 - Remove hideTempErr to allow downstream users to check for errors like net.ErrClosed by [@​UnAfraid](https://github.com/UnAfraid) in gorilla/websocket#894 - Do not timeout when WriteControl deadline is zero in gorilla/websocket#898 - Excludes errchecks linter by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#904 - Return errors instead of printing to logs by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#897 - Revert " Update go version & add verification/testing tools ([#​840](gorilla/websocket#840))" by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#908 - Fixes broken random value generation by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#926 - Reverts back to v1.5.0 by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#929 #### New Contributors - [@​KSDaemon](https://github.com/KSDaemon) made their first contribution in gorilla/websocket#823 - [@​mstmdev](https://github.com/mstmdev) made their first contribution in gorilla/websocket#862 - [@​pnx](https://github.com/pnx) made their first contribution in gorilla/websocket#865 - [@​rfyiamcool](https://github.com/rfyiamcool) made their first contribution in gorilla/websocket#868 - [@​bcreane](https://github.com/bcreane) made their first contribution in gorilla/websocket#878 - [@​XdpCs](https://github.com/XdpCs) made their first contribution in gorilla/websocket#881 - [@​ninedraft](https://github.com/ninedraft) made their first contribution in gorilla/websocket#872 - [@​nak3](https://github.com/nak3) made their first contribution in gorilla/websocket#863 - [@​UnAfraid](https://github.com/UnAfraid) made their first contribution in gorilla/websocket#894 - [@​apoorvajagtap](https://github.com/apoorvajagtap) made their first contribution in gorilla/websocket#904 **Full Changelog**: gorilla/websocket@v1.5.1...v1.5.3 ### [`v1.5.2`](https://github.com/gorilla/websocket/releases/tag/v1.5.2) [Compare Source](gorilla/websocket@v1.5.1...v1.5.2) #### What's Changed - Fixes subprotocol selection (aling with rfc6455) by [@​KSDaemon](https://github.com/KSDaemon) in gorilla/websocket#823 - Update README.md, replace master to main by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#862 - Use status code constant by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#864 - conn.go: default close handler should not return ErrCloseSent. by [@​pnx](https://github.com/pnx) in gorilla/websocket#865 - fix: replace ioutil.readfile with os.readfile by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#868 - fix: add comment for the readBufferSize and writeBufferSize by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#869 - Remove noisy printf in NextReader() and beginMessage() by [@​bcreane](https://github.com/bcreane) in gorilla/websocket#878 - docs(echoreadall): fix function echoReadAll comment by [@​XdpCs](https://github.com/XdpCs) in gorilla/websocket#881 - make tests parallel by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#872 - Upgrader.Upgrade: use http.ResposnseController by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#871 - Do not handle network error in `SetCloseHandler()` by [@​nak3](https://github.com/nak3) in gorilla/websocket#863 - perf: reduce timer in write_control by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#879 - fix: lint example code by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#890 - feat: format message type by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#889 - Remove hideTempErr to allow downstream users to check for errors like net.ErrClosed by [@​UnAfraid](https://github.com/UnAfraid) in gorilla/websocket#894 - Do not timeout when WriteControl deadline is zero in gorilla/websocket#898 - Excludes errchecks linter by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#904 - Return errors instead of printing to logs by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#897 - Revert " Update go version & add verification/testing tools ([#​840](gorilla/websocket#840))" by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#908 - Fixes broken random value generation by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#926 #### New Contributors - [@​KSDaemon](https://github.com/KSDaemon) made their first contribution in gorilla/websocket#823 - [@​mstmdev](https://github.com/mstmdev) made their first contribution in gorilla/websocket#862 - [@​pnx](https://github.com/pnx) made their first contribution in gorilla/websocket#865 - [@​rfyiamcool](https://github.com/rfyiamcool) made their first contribution in gorilla/websocket#868 - [@​bcreane](https://github.com/bcreane) made their first contribution in gorilla/websocket#878 - [@​XdpCs](https://github.com/XdpCs) made their first contribution in gorilla/websocket#881 - [@​ninedraft](https://github.com/ninedraft) made their first contribution in gorilla/websocket#872 - [@​nak3](https://github.com/nak3) made their first contribution in gorilla/websocket#863 - [@​UnAfraid](https://github.com/UnAfraid) made their first contribution in gorilla/websocket#894 - [@​apoorvajagtap](https://github.com/apoorvajagtap) made their first contribution in gorilla/websocket#904 **Full Changelog**: gorilla/websocket@v1.5.1...v1.5.2 </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yODYuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQxOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> See merge request alpine/infra/build-server-status!14
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Noticed a change in default close handler from 1.5.0 to 1.5.1
1.5.1 Now returns the error from
WriteControl
withCloseMessage
type. However this results in ErrCloseSent returned if the connection initiated the close handshake. This is normally correct as the connection should not be able to write after a close handshake is initiated, except when calling the close handler. in that case nil should be returned so thatadvanceFrame()
can return the actual close message.Related Tickets & Documents
Added/updated tests?
have not been included
Run verifications and test
make verify
is passing (fails withGO-2023-2186 Incorrect detection of reserved device names on Windows in path/filepath
that is unrelated to this change)make test
is passing