Skip to content

fix: preserve timeout acknowledgement arguments #414

Closed

Description

@electrohyun

Description

Timeout-decorated callback acknowledgements preserve only the first response value. Socket.IO 4.7.5 and 4.8.3 pass every acknowledgement argument after the leading null error in both client-to-server and server-to-client directions. This callback behavior should be corrected without changing the existing first-value policy for Promise emitWithAck().

Reproduction

socket.on('request', (ack) => ack(1, 2, 3));

peer.timeout(100).emit('request', (...args) => {
  console.log(args);
});
// Socket.IO: [null, 1, 2, 3]
// Smocket 0.5.1: [null, 1]

smocket version

0.5.1

Environment

Node 24.11.1, Vitest 4.1.10, Socket.IO 4.7.5 and 4.8.3

Activity

  1. added this to the v1.0.0 milestone on Aug 26, 2026
  2. added
    bug
    on Aug 26, 2026
  3. moved this from Backlog to In progress in smocketon Aug 26, 2026
  4. moved this from In progress to Done in smocketon Aug 26, 2026
  5. self-assigned this
    on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions