question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Config/Settings to ApplicationRunner (openHandshakeTimeout)

See original GitHub issue

Hi, How can I override default openHandshakeTimeout param? I am going run ApplicationRunner with greater handshake timout in python code. I have tried, but nothing: subscriber = ApplicationRunner(url=u"wss://api.....", realm=u"realm1",extra={'openHandshakeTimeout':10})

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:35 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
meejahcommented, Jun 8, 2017

Have you looked at the (in-progress) Component API? On master this allows changing the handshake timeout, too. It only currently works with Twisted (not yet asyncio) but of course that is planned.

For your use-case that would look something like this:

from autobahn.twisted.component import Component, run

component = Component(
    transports=[
        "type": "websocket",
        "url": u"wss://api.poloniex.com",
        "options": {
            "open_handshake_timeout": 60.0,
        }
    ],
    realm=u'realm1',
    # authentication= {...} if you need too
)

def on_event(*args):
    print('{0}: {1} A:{2} B:{3} {4}% V:{5} H:{8} L:{9}'.format(*args))

@component.on_join
@inlineCallbacks
def join(session, details):
    print("Session {} joined: {}".format(details.session, details))
    yield session.subscribe(on_event, 'ticker')

if __name__ == '__main__':
    run(component)

Is this API easier to understand? Although you can still use an ApplicationSession subclass if you want, there’s no need to subclass to use it…

1reaction
oberstetcommented, Jun 8, 2017

Interesting! They must be running a quite old version of Crossbar.io, which you can tell from the WebSocket upgrade header: 'x-powered-by': 'AutobahnPython/0.13.0'.

We (Crossbar.io GmbH) are offering commercial support for Crossbar.io and all Autobahn client libraries, and as they are running a commercial venture, we’d be happy to address these issues under a support contract. We currently are working with a couple of companies already, and because of limited resources, we prioritize paying customers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebSocket and WAMP in Python for Twisted and asyncio
Config/Settings to ApplicationRunner (openHandshakeTimeout) ... I am going run ApplicationRunner with greater handshake timout in python ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found