Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#96 - fix call of server handle in Gevents Hub context #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

#96 - fix call of server handle in Gevents Hub context #132

wants to merge 1 commit into from

Conversation

AndreiPashkin
Copy link

Before that patch, request handler of the server was executed in
Gevents Hub context. Which is wrong, because inside it it is
impossible to use Gevent blocking API, and servers handle uses it.

This patch fixed it - instead of overriding do_handle method, which is not
supposed to be overriden, server just uses public interface of StreamServer
and passes handle to it's init.

It fixes #96.

Here is the minimal setup, that reproduces this problem:

https://gist.github.com/AndrewPashkin/b6405a1e565885f015c3

Before that patch, request handler of the server was executed in
Gevents Hub context. Which is wrong, because inside it it is
impossible to use Gevent blocking API, and servers handle uses it.

This patch fixed it - instead of overriding `do_handle` method, which is not
supposed to be overriden, server just uses public interface of StreamServer
and passes handle to it's init.
Neurotec added a commit to Neurotec/plivoframework that referenced this pull request May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gevent 1.0rc2 breaks plivo
2 participants