Poloniex Push WAMP API through Autobahn dropping connection to peer tcp

强颜欢笑 提交于 2019-12-06 02:19:33

问题


I tried to connect to the Push API in poloniex using python and followed the instructions on the answer here:

How to connect to poloniex.com websocket api using a python library

However I keep getting this error:

2017-06-25T04:07:04 dropping connection to peer tcp:104.20.13.48:443 with abort=True: WebSocket opening handshake timeout (peer did not finish the opening handshake in time)

Anyone know what's going on here? I can't figure it out from online documentation. Thanks!


回答1:


As per @Cyphrags suggestion, I was able to get my autobahn websocket to work outside of localhost by increasing openHandshakeTimeout with factory.setProtocolOptions

factory.protocol = MyClientProtocol factory.setProtocolOptions(failByDrop=False, openHandshakeTimeout=90, closeHandshakeTimeout=5)

Solution found via https://github.com/crossbario/crossbar/issues/930. Perhaps the reason it is needed has something to do with slow DNS routing taking longer than the default handshake time.



来源:https://stackoverflow.com/questions/44744630/poloniex-push-wamp-api-through-autobahn-dropping-connection-to-peer-tcp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!