-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not modify the input packet upon encoding
Note: this issue has existed since Socket.IO v1.0 (see [1]), because the `deconstructPacket()` method also mutates its input argument. This also explains why some adapters (like [2]) need to use `process.nextTick()` when extending the `broadcast()` method, because `Adapter.broadcast()` calls `Encoder.encode()` ([3]). Related: - socketio/socket.io#4374 - socketio/socket.io-mongo-adapter#10 [1]: 299849b [2]: https://github.com/socketio/socket.io-postgres-adapter/blob/0.3.0/lib/index.ts#L587-L590 [3]: https://github.com/socketio/socket.io-adapter/blob/2.4.0/lib/index.ts#L148
- Loading branch information
1 parent
9143aa4
commit ae8dd88
Showing
4 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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