Skip to content

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

Open
Andrew Pashkin (AndreiPashkin) wants to merge 1 commit intoplivo:masterfrom
AndreiPashkin:master
Open

#96 - fix call of server handle in Gevents Hub context#132
Andrew Pashkin (AndreiPashkin) wants to merge 1 commit intoplivo:masterfrom
AndreiPashkin:master

Conversation

@AndreiPashkin
Copy link
Copy Markdown

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.
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