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

[EventLoop] libevent can't close connection #9

Closed
cboden opened this issue May 10, 2012 · 3 comments
Closed

[EventLoop] libevent can't close connection #9

cboden opened this issue May 10, 2012 · 3 comments
Labels

Comments

@cboden
Copy link
Member

cboden commented May 10, 2012

Here is the code I was using against the master branch: https://gist.github.com/2653190

If I call $conn->end() the client receives the write buffer (HTTP Response) but the connection does not close. If I call $conn->close() the server does close the connection, but does not receive the write buffer.

  • Mac OS 10.7.3
  • libevent 2.0.17-stable
  • php libevent bindings v0.0.5
@nrk
Copy link
Member

nrk commented May 11, 2012

I'm sorry if it looks like I'm always bringing bad news about pecl-libevent but the extension doesn't seem to officially support libevent > 1.4.x and we are already having issues with libevent 2.x when using tick().

I'll try again the same gist using both libevent 1.4 and 2.0 asap (on Linux).

nrk added a commit to nrk/react that referenced this issue May 12, 2012
When doing two consecutive updates on an event resource inside the same
tick, pecl-libevent seems to get stuck without properly freeing up the
event. It is still unclear if it is something related to pecl-libevent
or libevent itself, but our new approach seems to fix this problem.

For now we just delete the previous resource and create a new one one
on the associated stream using the new flags.

This commit should fix issue reactphp#9.
@nrk
Copy link
Member

nrk commented May 12, 2012

@cboden can you double check if the above PR fixes the issue? It seems to work for me.

@cboden
Copy link
Member Author

cboden commented May 12, 2012

That's a bingo! Thanks @nrk!

@cboden cboden closed this as completed May 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants