You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 samefd
andflags
, 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
The text was updated successfully, but these errors were encountered: