-
Notifications
You must be signed in to change notification settings - Fork 426
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
Get local host name before opening TDSChannel #324
Get local host name before opening TDSChannel #324
Conversation
Codecov Report
@@ Coverage Diff @@
## RTW_6.2.0 #324 +/- ##
===============================================
- Coverage 37.17% 37.15% -0.02%
+ Complexity 1670 1666 -4
===============================================
Files 103 103
Lines 23663 23664 +1
Branches 3918 3918
===============================================
- Hits 8796 8793 -3
Misses 13278 13278
- Partials 1589 1593 +4
Continue to review full report at Codecov.
|
@@ -1991,6 +1993,14 @@ private void connectHelper(ServerPortPlaceHolder serverInfo, | |||
connectionlogger.fine(toString() + " Connecting with server: " + serverInfo.getServerName() + " port: " + serverInfo.getPortNumber() | |||
+ " Timeout slice: " + timeOutsliceInMillis + " Timeout Full: " + timeOutFullInSeconds); | |||
} | |||
|
|||
// Before opening the TDSChannel, calculate local hostname | |||
// as the InetAddress.getLocalHost() takes more than usual time in certian OS and JVM combination, it avoids connection loss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: I think it should be good if we mention that in Sierra getLocalHost takes lot of time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: As you are moving condition we can reduce complexity by 1 by using StringUtils.isEmpty()
Fixes #177