Poloniex Push WAMP API through Autobahn dropping c

2019-04-08 11:00发布

问题:

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.