Ack emit is not propagated through onAnyOutgoing
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, nodejs, typescript
Research direction
Start with the server-side socket event handling shown in the reproduction, then trace how the msg acknowledgment callback is emitted and how onAnyOutgoing observes outgoing messages. Reproduce the server and client example, and confirm that the acknowledgment is included in the outgoing-event observation when the behavior is fixed.
Written by the indexing model from the issue text.
Description
Describe the bug
Ack emit is not propagated through onAnyOutgoing.
To Reproduce
Socket.IO server version: latest
Server
import { Server } from "socket.io";
const io = new Server(3000, {});
io.on("connection", (socket) => {
console.log(`connect ${socket.id}`);
socket.use((event) => {
console.log(event) // not logger for "test msg"
})
socket.on('msg', (reply) => {
reply('test msg')
})
socket.on("disconnect", () => {
console.log(`disconnect ${socket.id}`);
});
});
Socket.IO client version: latest
Client
import { io } from "socket.io-client";
const socket = io("ws://localhost:3000/", {});
socket.on("connect", () => {
console.log(`connect ${socket.id}`);
});
socket.emit("msg")
socket.on("disconnect", () => {
console.log("disconnect");
});
Expected behavior
onAnyOutgoing is called for ANY outgoing message
- Dominant language
- TypeScript
- Stars
- 63.2k
- Forks
- 10.3k
- Avg merge
- 11d 20h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from socketio/socket.io
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 56/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in socketio/socket.io
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·