phpsocket.io
phpsocket.io copied to clipboard
Got disconnect packet
I don't know why I randomly get this error but nothing is being disconnected. I have it setup to emit a comment to send a comment/text. Randomly it will show got disconnect packet which gets disconnects the receiver.
It's not calling ondisconnect. What could be causing this and are there any error logs because I can't find them if there are.
Just a log, please ignore it.
The problem is when this happens my user gets disconnected. Which causes problems for what I'm using it for. I'm trying to understand why it's getting this signal randomly.
On Fri, May 10, 2019, 3:09 AM walkor [email protected] wrote:
Just a log, please ignore it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/walkor/phpsocket.io/issues/193#issuecomment-491200029, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5T6QN55PZGSTQDB3VPUUDPUUUUZANCNFSM4HLYSP6Q .
When client side call the function socket.close() or socket.disconnect() the server will get the disconnect packet and show the log. So it seems not a problem.
Thanks for the reply. However it's not getting called. That is the issue. I've tried it using Android and IOS and I can replicate the problem with both. So I don't think it's a client issue. Is there anything that can simulate a close connection? Like a php error or actions etc? Because when a particular emit happens to the server from a device the others in the room get disconnected but not the sender. Not sure what's going on.
On Fri, May 10, 2019 at 9:55 PM walkor [email protected] wrote:
When client side call the function socket.close() or socket.disconnect() the server will get the disconnect packet and show the log. So it seems not a problem.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/walkor/phpsocket.io/issues/193#issuecomment-491473732, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5T6QIFNPMI4XOPBK2KXXDPUYYTFANCNFSM4HLYSP6Q .
var socket = io('...');
socket.on('connect', function(){
socket.close();
});
The codes will simulate a close connection for javascript. I can not tell you why your Android and IOS client send a close package may be something incompatible with phpsocket.io .
I have this same issue. Sever receive disconnected, bug client still send message, and sever don't any message
The reason of this issue is my server code have bug, so server auto disconnect client. I fix my code, it will be ok. @tolew1 you maybe check you code。