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.

Expose auto-reconnect knobs

See original GitHub issue

We still have the “new API” issue open, where a whole new, “better” API was discussed - we no final conclusion yet. But we need auto-reconnect now. So here is a pragmatic approach with only slight API changes, which would allow to handle reconnects, as well as more flexibility.

  • Rename autobahn.twisted.wamp.ApplicationSession to autobahn.twisted.wamp.Component
  • Rename autobahn.twisted.wamp.ApplicationRunner to autobahn.twisted.wamp.Client
  • A Client can have instances of Components be added, and then the Client can be started:
component = Component(extra={u'foo': u'bar'})
client = Client(url=u'ws://localhost:8080/ws')
client.connect(realm=u'realm1', autoreconnect=True)
react(client.start)

The Client.start() method returns a Deferred that fires when the Component.onDisconnect() callback ends and does not recall into Component.connect().

The Component.onDisconnect() callback can call Component.connect() to reconnect, or can return a plain or deferred value or exception.

When Component.onDisconnect() ends, the Client.start() method will end.

The autoreconnect option on the Client.connect() method activates a default implementation of Component.onDisconnect() which does not end, but reconnects the component.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
manatlancommented, Apr 15, 2016

… But we need auto-reconnect now …

For sure … I really think there are a lot of autobahn-python new users, which could be completely disappointed about this auto-reconnect missing feature. Nowadays, in the connected area, with smartphones which loose frequently the connection … an autobahn component is useless.

I really think it’s really most important than a new api

Read more comments on GitHub >

github_iconTop Results From Across the Web

INSTALLATION INSTRUCTIONS AutoConnect Kit
Adjust mower height control knob to desired setting. 15. Lower deck by pushing forward on top hydraulic lever. 16. Turn off engine and...
Read more >
Datasources - Quarkus
This disables collecting the metrics as well as exposing them in the /q/metrics endpoint, because it does ... quarkus.datasource.reactive.reconnect-attempts.
Read more >
DC426BT - Dual Electronics
knob left/right to adjust or activate the desired function. Power On/Off. Mode. Auxiliary Input ... CDs exposed to extreme temperatures or direct sunlight....
Read more >
Stamps v1.1 User Guide - Adrian Pueyo
distinct nodes with hidden inputs that reconnect themselves when ... If the node has a file knob filled in, it will guess it...
Read more >
PARTYBOX 100
Do not expose batteries to excessive heat such as sunshine, fire or the like. ... Rotate the knob to adjust the microphone volume....
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