Convert socket adaptor to socket#160
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #160 +/- ##
============================================
- Coverage 29.77% 29.65% -0.13%
+ Complexity 1251 1247 -4
============================================
Files 97 97
Lines 23303 23305 +2
Branches 3871 3871
============================================
- Hits 6939 6910 -29
- Misses 15014 15043 +29
- Partials 1350 1352 +2
Continue to review full report at Codecov.
|
|
I tried out our test case and it fixes the cancellation issue when multiSubnetFailover is enabled. It no longer hangs and the cancellation happens correctly. Very nice. Skimming through the implementation, it looks like the approach is to close the socket channel and reconnect it as a regular socket. That should be be fine though it does lead to the situation that all multi subnet enabled connections will create two socket connections to the server (the first being closed). It'd be marginally slower than directly using the channel but it shouldn't be a big deal as it's just the establishment of the TCP socket. Also, I don't think it's an issue on the server to have the first connection closed as the driver is already doing that to the rest of the resolved addresses anyway. So looks good to me. FYI, the commit message has a typo: |
|
@sehrope Thank you for getting back to us. We are glad to know you are satisfied with this fix. |
for issue #144