Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Server keeps files open for bad clients #354
I have one static file of 1188 bytes size that mosquitto should serve when a http request is made to the websocket listener. This worked reasonably well until last week. At that point it would refuse new connections, claiming "Too many files open". Checking with lsof revealed that it would keep a lot of instances to the static file open.
I managed to reproduce it fairly easy. In the .conf:
If you run lsof after each time you run of the line above, it will have one more line like:
Actually requesting the file with curl does not have the same problem. Only if you close the connection before receiving the whole file.
Tested with mosquitto/libwebsockets 1.4.8/1.7.8 and 1.4.10/1.7.9.
I'm not sure where this bug could be. I presume somewhere in
I appreciate any tips on where to look to build a patch.