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

Boost handler doesn't work with SSL #424

Open
svyatogor opened this issue Sep 6, 2021 · 0 comments
Open

Boost handler doesn't work with SSL #424

svyatogor opened this issue Sep 6, 2021 · 0 comments

Comments

@svyatogor
Copy link

Describe the bug
Current implementation of Boost Asio handler doesn't play well with SSL and causes very fast memory leak with 100% cpu usage. The underlying reason is that unlike uv and ev the implementations it doesn't like monitor being called more than once with the same fd and flags, which just results in multiple handlers being created. This doesn't seem to affect non-ssl connections but as SSL will "repeat" on SSL_ERROR_WANT_READ it immediately becomes a problem.

I am well away that this implementation is not done by the library author, but I still decided to leave this bug report here in cases someone else faces the same issue.

In case someone finds it useful I am attaching my implementation of the handler, which in addition supports heartbeats. It was tested with C++ 17 and I am not certain if it will work on lower versions out of the box.

https://gist.github.com/svyatogor/6356dc1b4bea0033c086f7be2bd77843

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

No branches or pull requests

1 participant