socket.io-client-swift icon indicating copy to clipboard operation
socket.io-client-swift copied to clipboard

reconnect not disabled after disconnect

Open NawarKh opened this issue 6 years ago • 4 comments

this is a bug version 15.2.0 when I use manager!.disconnectSocket(mSocket!); for disconnect and app goes background after reopen app , socketio try to reconnect before I request that with .connect() so this causing error if you synchronization with other servers like PHP Solved by add manager?.reconnects = false; before disconnect action

so manager!.reconnects = false; manager!.disconnectSocket(mSocket!);

now it will not reconnect until I Ask for , after come from background

NawarKh avatar Apr 22 '20 14:04 NawarKh

also same problem with mSocket.disconnect();

NawarKh avatar Apr 22 '20 14:04 NawarKh

I have the same problem, how to solve this issue?

Cmdrobot avatar Jun 04 '20 04:06 Cmdrobot

same problem, server won't receive disconnect event until I reset xcode app. Simply socket.disconnect() not work at all and still see ping log in xcode console.

flyinghawker avatar Jun 10 '20 15:06 flyinghawker

I checked Starscream version, currently already upgraded to 4+. Maybe that is the problem? or would our lovely author will update the dependency in the near future? Thanks a lot.

flyinghawker avatar Jun 10 '20 15:06 flyinghawker