elephant.io icon indicating copy to clipboard operation
elephant.io copied to clipboard

Connection reset by peer

Open JavaMachine opened this issue 9 years ago • 4 comments

I am using Socket.IO Java Implementation on server side, which should interact with Android, iOS and PHP web page...

On Android and iOS everything seems ok, but PHP client disconnects from server incorrectly and receiving 'DefaultExceptionListener - Connection reset by peer' on server side...

As far as I know in socket.io clients should notify server before disconnecting...

My code example:

<?php

try {
        $client = new \ElephantIO\Client(new \ElephantIO\Engine\SocketIO\Version1X('http://localhost:29699'));
        $client->initialize();
        $client->emit($eventName, $data);
        $client->close();
    } catch (Exception $e) {
        logError($e->getMessage());
    }

How can I force your library to send notification and then sending 'RST packet'???

Thanks in advance...

JavaMachine avatar Mar 14 '16 12:03 JavaMachine

With the 3.1, a close frame is sent before disconnecting the socket. Is it better now ?

Taluu avatar Mar 23 '16 12:03 Taluu

@Taluu Thank you for your reply, but I am sure that I am already using version 3.1...

JavaMachine avatar Mar 30 '16 10:03 JavaMachine

Were you using dev-master ? Because the 3.1 was released just a week ago

Taluu avatar Mar 30 '16 11:03 Taluu

@Taluu It seems I was using older version... But the problem is, after update problem is still there(

JavaMachine avatar Apr 06 '16 06:04 JavaMachine