Skip to content
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 bug where setting validateSignonTimeOut causes the soTimeout to also be set after calling AS400.validateSignon() #216

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

pjyoung-ibm
Copy link
Member

An issue was discovered internally where calling AS400.setvalidateSignonTimeOut() and then subsequently calling AS400.validateSignon() would cause the SocketProperties on that AS400 object to have the soTimeout set for future host server connections. This causes an issue when threads are used for communication, as soTimeout and threadsUsed are generally incompatible. This manifested as "Read time out" errors in code that had a long time between requests to the system. Switching the validateSignon() code to copy the socket properties instead of changing the main reference cleared up the issue.

…lso be set after calling AS400.validateSignon()

This causes issues when threads are used for communication with the system, as soTimeout and threadsUsed are generally incompatible.

Signed-off-by: Parker Young <[email protected]>
Copy link
Member

@nadiramra nadiramra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this fix is reasonable. I also noticed that we do not copy properties in AS400(AS400 system) constructor. I will change that to also copy the properties instead of sharing SocketProperties object between AS400 objects.

@jeber-ibm jeber-ibm merged commit eb17c1c into IBM:main Oct 22, 2024
2 checks passed
@pjyoung-ibm pjyoung-ibm deleted the validate-signon-timeout-fix branch October 23, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants