Python ws4py在Linux系统中出现错误

Python ws4py在Linux系统中出现错误,python,linux,websocket,ws4py,wsgiserver,Python,Linux,Websocket,Ws4py,Wsgiserver,我使用ws4py作为websocket服务器。它可以在Windows和Mac中正常运行,但在linux系统中运行,当websocket客户端连接到服务器时会增加TB。有人能告诉我如何修复这个错误吗 [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-packag

我使用ws4py作为websocket服务器。它可以在Windows和Mac中正常运行,但在linux系统中运行,当websocket客户端连接到服务器时会增加TB。有人能告诉我如何修复这个错误吗

[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')

这是ws4py中的一个bug,当与gevent 1.1一起用作底层时 WSGI处理程序返回时套接字关闭


请参阅:

这是ws4py中的一个bug,当与gevent 1.1一起用作底层时 WSGI处理程序返回时套接字关闭


请参阅:

示例代码?Please.def start_ws4py_server():server=WSGIServer(“”,9002),WebSocketWSGIApplication(handler_cls=WebSocket_handler))server.service_forever()如果name='main':configure_logger()start_ws4py_server()无人,修改/编辑帖子并在其中包含代码。请缩进。样本代码?Please.def start_ws4py_server():server=WSGIServer(“”,9002),WebSocketWSGIApplication(handler_cls=WebSocket_handler))server.service_forever()如果name='main':configure_logger()start_ws4py_server()无人,修改/编辑帖子并在其中包含代码。请缩进。虽然此链接可以回答问题,但最好在此处包含答案的基本部分,并提供链接以供参考。如果链接页面发生更改,则仅链接答案可能无效。虽然此链接可以回答问题,但最好在此处包含答案的基本部分,并提供链接以供参考。如果链接页面发生更改,则仅链接的答案可能无效