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

Application.Quit() not work on iOS

Open niyouwoxi opened this issue 6 years ago • 1 comments

    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();
    }

niyouwoxi avatar Mar 05 '19 10:03 niyouwoxi

should change to if(IsConnected) { WebSocket.Close(); } otherwise app can not quit when call Application.Quit() on iOS.

niyouwoxi avatar Mar 05 '19 10:03 niyouwoxi