Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Android, signal websocket : SSLException after 7 minute #713

Open
hytTony opened this issue Aug 17, 2021 · 0 comments
Open

Android, signal websocket : SSLException after 7 minute #713

hytTony opened this issue Aug 17, 2021 · 0 comments

Comments

@hytTony
Copy link

hytTony commented Aug 17, 2021

Connect to appr.tc server, all are fine.

Connect to myown server :

  1. All use web client (2 end point are web), is fine.
  2. Create room on android client first, then join to the room on web, is fine too.
  3. Create room on web first, then join to the roow on android, will throw this error.

Error description:

  • Always throw this error after 7 minutes every times
  • At WebSocketReader.class:
public void run() {
        synchronized(this) {
            this.notifyAll();
        }
        InputStream inputStream = null;
        try {
            inputStream = this.mSocket.getInputStream();
        } catch (IOException var3) {
            Log.e(TAG, var3.getLocalizedMessage());
            return;
        }
        this.mInputStream = inputStream;
        Log.d(TAG, "WebSocker reader running.");
        this.mApplicationBuffer.clear();
        while(!this.mStopped) {
            try {
                ************************************************Error here***************************************************
                int bytesRead = this.mInputStream.read(this.mNetworkBuffer); //Error here
                **************************************************************************************************************
                if (bytesRead > 0) {
                    this.mApplicationBuffer.put(this.mNetworkBuffer, 0, bytesRead);
                    while(this.consumeData()) {
                    }
                } else if (bytesRead == -1) {
                    Log.d(TAG, "run() : ConnectionLost");
                    this.notify(new ConnectionLost());
                    this.mStopped = true;
                } else {
                    Log.e(TAG, "WebSocketReader read() failed.");
                }
            } catch (WebSocketException var5) {
                Log.d(TAG, "run() : WebSocketException (" + var5.toString() + ")");
                this.notify(new ProtocolViolation(var5));
            } catch (SocketException var6) {
                Log.d(TAG, "run() : SocketException (" + var6.toString() + ")");
                this.notify(new ConnectionLost());
            } catch (IOException var7) {
                ************************************************Error this***************************************************
                Log.d(TAG, "run() : IOException (" + var7.toString() + ")");   //Error this
                *************************************************************************************************************
                this.notify(new ConnectionLost());
            } catch (Exception var8) {
                Log.d(TAG, "run() : Exception (" + var8.toString() + ")");
                this.notify(new Error(var8));
            }
        }
        Log.d(TAG, "WebSocket reader ended.");
    }

The error message:
run() : IOException (javax.net.ssl.SSLException: Read error: ssl=0x712b58aa40: I/O error during system call, Connection timed out)

Sorry for my poor english.

Thanks for any help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant