Skip to content

On page Refresh Online users array not getting populated #17

Open

Description

@TajMohammad786

When refresh page is triggered, the OnlinUser array discards the user and undefined is set, in SocketMap
This happens only when someone reloads the page.

  • In socket.js file
const userId = socket.handshake.query.userId;
console.log("user", userId);

Output is undefined when page reload is performed

  • Possible solution
  1. explicitly pass userId to socket

If anybody has encountered this and have a better solution just reply to this thread

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions