Multiple connection issue. #12

Merged
merged 1 commit into from Apr 8, 2013

Projects

None yet

3 participants

@albaltas
Contributor
albaltas commented Apr 8, 2013

Hello!

I just made some minor changes to your library, making it handle multiple connections somewhat better. Actually, when a new request arrives, the library now drops the old connection. So, again, you can only have one active client, but it does not fail when more than one requests occur.

Hope you like it,
Alex

@ejeklint ejeklint merged commit 7782880 into ejeklint:master Apr 8, 2013
@ejeklint
Owner
ejeklint commented Apr 8, 2013

Thank you! Much appreciated.

@ladsmund

Hi,

If a web page running a websocket client is reloaded many times, a frame longer than 64 chars may occure
When the Arduino server tries to close socket it stalls when writing to the client: "client.write((uint8_t) 0x08);"
I think, this could be caused by the lost ethernet connection. Therefore I added

    if(!client.connected()){
        return false;
    }

before making the nice close.

Hope it makes sense for you.
Mads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment