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-adapter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.5.2
Choose a base ref
...
head repository: socketio/socket.io-adapter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.5.3
Choose a head ref
  • 13 commits
  • 8 files changed
  • 1 contributor

Commits on Feb 20, 2024

  1. refactor: import the ClusterAdapter abstract class

    Imported from https://github.com/socketio/socket.io-redis-adapter/blob/ef5f0da0b4928fd422afc985aec0e233d34400c0/lib/cluster-adapter.ts
    
    This abstract class is currently used by the sharded Redis adapter. We
    import it here because the logic can be reused by the other adapters,
    which will then only need to handle the pub/sub mechanism.
    darrachequesne committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    b157e9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2d3695 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80af4e9 View commit details
    Browse the repository at this point in the history
  4. fix(cluster): notify the other nodes when closing

    The clustered adapter will now:
    
    - periodically check if a node has left the cluster
    - send an event when it leaves the cluster
    
    This should reduce the number of "timeout reached: only x responses
    received out of y" errors.
    darrachequesne committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    0e23ff0 View commit details
    Browse the repository at this point in the history
  5. refactor(cluster): allow to call onMessage() with a cluster response

    The Redis adapter is currently the only adapter which makes a
    distinction between publishing messages (one channel for all) and
    responses (one channel for each node).
    darrachequesne committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    1011ab3 View commit details
    Browse the repository at this point in the history
  6. refactor(cluster): catch publish errors

    Note: the current API does not currently allow the user to handle those
    errors (and retry, for example). This might be worth investigating for
    the next major version, maybe something like:
    
    ```js
    try {
      await io.emit("hello");
    } catch (e) {
      // something went wrong
    }
    ```
    
    Related: socketio/socket.io-mongo-adapter#15
    darrachequesne committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    39d4220 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d99a71b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2a6a215 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    2df5e94 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    48eddc1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1d8da64 View commit details
    Browse the repository at this point in the history
  4. refactor(cluster): make onMessage() method synchronous

    The fetchSockets() method of the parent class is synchronous, so the
    onMessage() method does not need to be asynchronous.
    darrachequesne committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5dcd182 View commit details
    Browse the repository at this point in the history
  5. chore(release): 2.5.3

    darrachequesne committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    549156c View commit details
    Browse the repository at this point in the history
Loading