WebSocket.close() keeping file descriptors in CLOSE_WAIT
on gevent-websocket 0.9.5 After running a websockets server for a couple days, I noticed python would crash saying too many files where open. Running lsof confirmed that python had a bunch of tcp connections in close_wait status. Adding the following line before calling WebSocket.close() seemed to help. ws.stream.handler.socket.close() If this work-around will lead to other problems, please tell me. If I'm doing something wrong, sorry to bother you.