Skip to content

It it duplicating the self messages after refreshing the window in examples/private messages #5340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MeeeeetShah opened this issue Apr 28, 2025 · 0 comments
Labels
to triage Waiting to be triaged by a member of the team

Comments

@MeeeeetShah
Copy link

MeeeeetShah commented Apr 28, 2025

Describe the bug
It it duplicating the self messages after refreshing the window in examples/private messages

To Reproduce

Go through examples and take pull from 4th (final branch) for example/private message if we send message to self then it seems to be correct but after refreshing the window we see duplicating the self messages..

Socket.IO server version: 3.1.2

Server

import { Server } from "socket.io";

const io = new Server(3000, {});

io.on("connection", (socket) => {
  console.log(`connect ${socket.id}`);

  socket.on("disconnect", () => {
    console.log(`disconnect ${socket.id}`);
  });
});

Socket.IO client version: 4.8.1

Client

import { io } from "socket.io-client";

const socket = io("ws://localhost:3000/", {});

socket.on("connect", () => {
  console.log(`connect ${socket.id}`);
});

socket.on("disconnect", () => {
  console.log("disconnect");
});

Expected behavior
It should show single message only

@MeeeeetShah MeeeeetShah added the to triage Waiting to be triaged by a member of the team label Apr 28, 2025
MeeeeetShah added a commit to MeeeeetShah/socket.io that referenced this issue Apr 29, 2025
…es after refreshing the window in examples/private messages socketio#5340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage Waiting to be triaged by a member of the team
Projects
None yet
Development

No branches or pull requests

1 participant