socket.io-client-unity3d
socket.io-client-unity3d copied to clipboard
Application.Quit() not work on iOS
protected override void RaiseOnCompletedOnDestroy() {
if (_cancelPingPong != null) {
_cancelPingPong.Dispose();
_cancelPingPong = null;
}
if (_onRecv != null) {
_onRecv.OnCompleted();
_onRecv = null;
}
if (!IsConnected) // Note : Here should be if(IsConnected)
WebSocket.Close();
}
should change to if(IsConnected) { WebSocket.Close(); } otherwise app can not quit when call Application.Quit() on iOS.