Skip to content

Commit

Permalink
Merge pull request #3 from matteobaglini/master
Browse files Browse the repository at this point in the history
Fix: if calls Close or Dispose many times it'll throws a NullReferenceException
  • Loading branch information
mgravell committed Mar 22, 2014
2 parents 0410468 + 16fcb3a commit 7c85913
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ partial void OnCreateReaderWriter(ConfigurationOptions configuration)

partial void OnCloseReaderWriter()
{
if (ownsSocketManager) socketManager.Dispose();
if (ownsSocketManager && socketManager != null) socketManager.Dispose();
socketManager = null;
}

Expand Down

0 comments on commit 7c85913

Please sign in to comment.