machinezone / IXWebSocket

websocket and http client and server library, with TLS support and very few dependencies
BSD 3-Clause "New" or "Revised" License
539 stars 173 forks source link

Don't read() from the invalid descriptor #503

Open CryptoManiac opened 7 months ago

CryptoManiac commented 7 months ago

Having the invalid value of descriptor here might be considered weird, but it happens nevertheless, when you're DoSing the websocket endpoint using the 3G connection. It makes sense to return the generic error here instead of trying to read() from it.

bsergean commented 4 months ago

Can you return -1 instead ?