Theldus / wsServer

wsServer - a tiny WebSocket server library written in C
https://theldus.github.io/wsServer
GNU General Public License v3.0
427 stars 86 forks source link

Bug Fix: Rejects the zombie connection #16

Closed CleberPeter closed 3 years ago

CleberPeter commented 3 years ago

First of all thanks for the excellent library.

I found a situation when the socket list is full, see if it makes sense:

When the socket list is full ws_establishconnection is initialized with an invalid connection_index resulting in a zombie connection with the client.

Closing the accepted socket allows the client to manage the connection failure with the server.