Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Removed events before pushing event args back to the stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
DJGosnell committed Mar 28, 2017
1 parent a5ed2ab commit 9e1ca3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DtronixMessageQueue/Socket/SocketSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ public virtual void Close(SocketCloseReason reason) {
// ignored
}

send_args.Completed -= IoCompleted;
receive_args.Completed -= IoCompleted;

// Free the SocketAsyncEventArg so they can be reused by another client
args_pool.Push(send_args);
args_pool.Push(receive_args);

send_args.Completed -= IoCompleted;
receive_args.Completed -= IoCompleted;


// Notify the session has been closed.
OnDisconnected(reason);
Expand Down

0 comments on commit 9e1ca3b

Please sign in to comment.