Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketio/socket.io-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.7.4
Choose a base ref
...
head repository: socketio/socket.io-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.7.5
Choose a head ref
  • 2 commits
  • 13 files changed
  • 1 contributor

Commits on Mar 14, 2024

  1. fix: discard acknowledgements upon disconnection

    Previously, getting disconnected while waiting for an acknowledgement
    would create a memory leak, as the acknowledgement was never received
    and the handler would stay in memory forever.
    
    This commit fixes the issue:
    
    - handlers that do accept an error as first argument, such as:
    
    * `socket.emit("test", (err, value) => { ... })` with `ackTimeout` option
    * `socket.timeout(5000).emit("test", (err, value) => { ... })`
    * `const value = await socket.emitWithAck("test")`
    
    will now properly resolve with an error and get discarded.
    
    - handlers that don't like `socket.emit("test", (value) => { ... });`
    will simply be discarded upon disconnection
    
    Note: the structure of the 'acks' attribute has been left untouched, in
    order to prevent any breaking change.
    
    Related:
    
    - #1546
    - socketio/socket.io#4964
    darrachequesne committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    34cbfbb View commit details
    Browse the repository at this point in the history
  2. chore(release): 4.7.5

    darrachequesne committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4f6030f View commit details
    Browse the repository at this point in the history
Loading