britzl / defnet

Defold networking examples
MIT License
65 stars 16 forks source link

Fix not closing sockets in http server #10

Closed sashkent3 closed 2 years ago

sashkent3 commented 2 years ago

There is a bug in http server ss.receive function overload. It doesn't return "closed" as err when client disconnects. Thus client sockets do not close and after some number of requests every call to ss.update crashes with bad argument #1 to 'select' (descriptor too large for set size).

sashkent3 commented 2 years ago

Also added some minor changes to the code which allow to use Defold's own socket library.