-
Notifications
You must be signed in to change notification settings - Fork 21
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 for https://github.com/pruiz/AberrantSMPP/issues/11 #13
base: master
Are you sure you want to change the base?
Conversation
I changed it so it now respects your spacing(tabs). |
AberrantSMPP/SMPPCommunicator.cs
Outdated
@@ -622,7 +622,10 @@ public SmppResponse SendRequest(SmppRequest request) | |||
lock (_RequestsAwaitingResponse) | |||
{ | |||
state = new RequestState(SendPdu(request)); | |||
_RequestsAwaitingResponse.Add(state.SequenceNumber, state); | |||
if (!_RequestsAwaitingResponse.ContainsKey(state.SequenceNumber)) |
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.
I am afraid this is still racy.. We will need to use some kind of concurrent dictionary or wrap this contains+add logic within a lock() {} statement.
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.
Okay - I will wrap it up into a concurrent dictionary, with TryAddUpdates.
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.
Hi! Why is it not accepted to master?
Try Catch block required for dead socket when write completes and updated gitIgnore to exclude .vs folder.