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

SessionState.Store (FileStore) is not threadsafe on .Set and .Get #259

Merged
merged 1 commit into from
Apr 23, 2014

Conversation

jacsuper
Copy link
Contributor

During a resendrequest - a .Get is done on the SessionState.Store. This
get is not synchronized with .Set calls done on sending messages.

If sending a message is initiated concurrently garbled or incorrect message data can
be read from the store and sent. An IOException can also occur - because of the global file object used.

This pull request includes a unit test and suggested lock.

Associated with Issue below:

#258

During a resendrequest - a .Get is done on the SessionState.Store.  This
get is not synchronized with .Set calls done on sending messages.  If
sending is initiated concurrently garbled or incorrect message data can
be resent.
@gbirchmeier
Copy link
Member

Can I get your name for the Contributors page?

@gbirchmeier
Copy link
Member

Er, sorry, I meant specifically @jacsuper , the Github user who contributed this patch.

(Sorry, I forgot that other people are watching this issue.)

@jacsuper
Copy link
Contributor Author

Jac Steyn

@gbirchmeier
Copy link
Member

included in #261

gbirchmeier added a commit that referenced this pull request Apr 23, 2014
@gbirchmeier
Copy link
Member

By the way, thanks for the big unit test. Much appreciated, it automatically puts you into the realm of best patch-submitters :)

hlibman-connamara pushed a commit to hlibman-connamara/quickfixn that referenced this pull request Dec 6, 2024
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.

2 participants