Gottox / socket.io-java-client

Socket.IO Client Implementation in Java
MIT License
950 stars 387 forks source link

If did't connected with server, will cause Dead cycle with connecting? #80

Open zhaoyubetter opened 10 years ago

zhaoyubetter commented 10 years ago

the code is : socketIO.connect(new IOCallback() {....} then the server is bad(I dont' know the reason);

but the websocket is seem to be in a dead cycle with 1,2

  1. WebsocketTransport.onClose();
    public void onClose(int code, String reason, boolean remote) { if(connection != null) connection.transportDisconnected(); }
  2. public void transportDisconnected() { this.lastException = null; setState(STATE_INTERRUPTED); reconnect(); }

if deleted the code "reconnect(); " the app is OK, Is the trouble is 2 ? thank you