-
Notifications
You must be signed in to change notification settings - Fork 332
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
SocketByteHandler is leaked when upgrading to SSL #1247
Comments
Because the |
Hi @bgrainger, |
The "v0.x" branch is still present (https://github.com/mysql-net/MySqlConnector/tree/v0.x). Since it's a two-line fix, it probably won't be too difficult to port back to https://github.com/mysql-net/MySqlConnector/blob/v0.x/src/MySqlConnector/Protocol/Serialization/StandardPayloadHandler.cs#L34-L38. However, I highly doubt that any of the CI infrastructure set up for it still works, so it may be very difficult to publish a new version. I would strongly recommend you make the fix locally then "publish" your own private version of MySqlConnector, e.g., version |
Just to be clear, because I think this will be a lot of effort, I do not plan to accept a contribution for this fix to the old branch and try to publish a new 0.69.11 release from the old code. You should plan to produce and use your own local private version with the fix. |
Thanks for the quick answer. We will make a private build for it. |
When
ServerSession
connects to a server via TCP, aSocketByteHandler
is created:MySqlConnector/src/MySqlConnector/Core/ServerSession.cs
Line 451 in 986f538
If the connection is upgraded to SSL,
InitSslAsync
replaces theByteHandler
with aStreamByteHandler
:MySqlConnector/src/MySqlConnector/Core/ServerSession.cs
Lines 1547 to 1548 in 986f538
At this point, the original
SocketByteHandler
is leaked, along with the TCP socket, theSocketAwaitable
, anOverlappedData
, etc.The text was updated successfully, but these errors were encountered: