Return runner's defer in Application.run #603
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I'm working on a lib to easily integrate autobahn in a synchronous application (see https://github.com/Scille/autobahn_sync)
Given I use crochet, the twisted reactor is already started when I run
Autobahn.Application
, which means I have to handle by myself the connection errors (see https://github.com/Scille/autobahn_sync/blob/53c7303a06cf53a783fabbc550b334d48d90d05a/autobahn_sync/core.py#L599)This is fine except
Autobahn.Application.run
doesn't return the ApplicationRunner's defer.To fix that I had to copy the
Application.run
function inside my app (see https://github.com/Scille/autobahn_sync/blob/master/autobahn_sync/core.py#L59), which feels like adding complexity for nothing...