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.3.2
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.4.0
Choose a head ref
  • 7 commits
  • 16 files changed
  • 1 contributor

Commits on Nov 16, 2021

  1. feat: add timeout feature

    Usage:
    
    ```js
    socket.timeout(5000).emit("my-event", (err) => {
      if (err) {
        // the server did not acknowledge the event in the given delay
      }
    });
    ```
    darrachequesne committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    ccf7998 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d54d12c View commit details
    Browse the repository at this point in the history
  3. fix: add package name in nested package.json

    Note: the version must be kept in sync when publishing a new release
    
    Related: #1513
    darrachequesne committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    53d8fca View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2021

  1. fix: fix socket.disconnect().connect() usage

    Previously, calling `socket.disconnect().connect()` could, if the
    connection was upgraded to WebSocket, result in "disconnect" being
    emitted twice, and an engine being leaked.
    
    Here's what happened:
    
    > socket.disconnect()
    
    - calls `socket.destroy()` so the socket doesn't listen to the manager events anymore
    - then calls `manager._close()` which closes the underlying engine but not the manager itself (it waits for the "close" event of the engine)
    
    > socket.connect()
    
    - calls `socket.subEvents()` so the socket does listen to the manager events
    - calls `manager.open()` which creates a new engine
    
    And then the first engine emits a "close" event, which is forwarded to
    the socket, hence the second "disconnect" event.
    
    Related: #1014
    darrachequesne committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    99c2cb8 View commit details
    Browse the repository at this point in the history
  2. fix: prevent double ack with timeout

    The ack was not properly removed upon timeout, and could be called
    twice.
    
    Related: ccf7998
    darrachequesne committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    522ffbe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e1952b View commit details
    Browse the repository at this point in the history
  4. chore(release): 4.4.0

    darrachequesne committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    71e34a3 View commit details
    Browse the repository at this point in the history
Loading