-
Notifications
You must be signed in to change notification settings - Fork 292
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
Fix connection resiliency check #306
Conversation
How does this change fix the issue? |
Me breaking things again. :sad: |
|
Oh. So what looked like assigning to an unneeded variable was causing a side effect that was used to check the connection status. In managed mode getting an empty read packet shouldn't do a network read so you need to check resiliency works in unix as well. |
So we have TdsParserStateObjectManaged.cs#L140 implemented for Managed code, I guess this would trigger an Empty read, isn't it? |
I don't see where the network read is coming from. What I see is that I removed a packet variable and then a call to Native:
Managed
You can see that both implementation of EmptyReadPacket and IsPacketEmpty only check values on the packet handle structure and don't do any sort of IO. The only place there is IO is in the native ReleasePacket implementation where it calls into the native wrapper so in sni dll there could be something that causes io or checks state and signals connection failure. There's nothing like that in the managed implementation though so it wouldn't work the same way. In the managed case is it this call to ReleasePacket that causes the required behaviour? |
@saurabh500 @Wraith2 |
If you can confirm that a simple call to |
Well shoot. In retrying my repro, I realized I forgot to switch my using from SDS back to MDS after plugging in my private MDS nuget build yesterday. The code change looked very likely but this does not fix it. 😞 I guess I know what I'm doing with the rest of my day. |
Fixes issue #304.
The connection resiliency check was broken in corefx PR 34047. Specifically, this change:
https://github.com/dotnet/corefx/pull/34047/files#diff-6ec231dd165f403aa5aee08548594035L2422