我使用ws4py作为websocket服务器。它可以在Windows和Mac上正常运行,但在linux系统中运行,当websocket客户端连接到服务器时会增加TB。有人能告诉我如何修复这个bug吗?
[2016-01-06 20:51:43,094] ERROR Failed to receive data
Traceback (most recent call last):
File "/home/yzliu/airtest/env/local/lib/python2.7/site-packages/ws4py/websocket.py", line 300, in once
b = self.sock.recv(self.reading_buffer_size)
File "/home/yzliu/airtest/env/local/lib/python2.7/site-packages/gevent/_socket2.py", line 264, in recv
return sock.recv(*args)
File "/home/yzliu/airtest/env/local/lib/python2.7/site-packages/gevent/_socket2.py", line 73, in _dummy
raise error(EBADF, 'Bad file descriptor')
当与gevent 1.1一起使用时,这是ws4py中的一个错误,作为底层WSGI处理程序返回时,套接字关闭。
请参阅:https://github.com/Lawouach/WebSocket-for-Python/pull/180/files