-
Notifications
You must be signed in to change notification settings - Fork 184
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
socket.on('receiveMessage',(data)=>print("data")) called twice #33
Comments
in Flutter i dont really know why log called twice i will wait answer thank you for your attention |
Came across the same issue. Apparently calling Try removing the |
You can also add "'autoConnect': false" option to optional parameters list to stop socket from auto-connecting. In that case you will have to call connect() manually. |
Still, shouldn't this at least print out a warning to the log or just ignore a second call to connect()? |
@bastibense I reopen it, and it looks like the behavior is not the same as JS version. |
still fired twice |
Hello |
Facing the same issue flutter... |
front end ---- IO.Socket? socket;
} void connect() { Backend const express = require("express"); //middlewre io.on("connection", (socket) => { server.listen(port, "0.0.0.0", () => { |
socket = IO.io("myserverurl", <String, dynamic>{
'transports': ['websocket']
});
socket.nsp = "/chats";
i send message my server log message call twice why it is called twice?
server code
io.of('nsp').to('id').('receiveMessage',message);
The text was updated successfully, but these errors were encountered: