Skip to content

Commit

Permalink
Merge pull request #785 from oclancy/SocketErrorCode_Change
Browse files Browse the repository at this point in the history
Update SocketReader::ReadSome SocketError when socket closed
  • Loading branch information
gbirchmeier authored Jan 24, 2024
2 parents a6efe80 + 84e06a2 commit 07a94c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion QuickFIXn/SocketInitiatorThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected int ReadSome(byte[] buffer, int timeoutMilliseconds)

int bytesRead = stream_.EndRead(request);
if (0 == bytesRead)
throw new SocketException(System.Convert.ToInt32(SocketError.ConnectionReset));
throw new SocketException(System.Convert.ToInt32(SocketError.Shutdown));

return bytesRead;
}
Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/SocketReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected virtual int ReadSome(byte[] buffer, int timeoutMilliseconds)

int bytesRead = _stream.EndRead(request);
if (0 == bytesRead)
throw new SocketException(System.Convert.ToInt32(SocketError.ConnectionReset));
throw new SocketException(System.Convert.ToInt32(SocketError.Shutdown));

return bytesRead;
}
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ What's New
* #764 - fix positive UTC offset parsing in DateTimeConverter (Rob-Hague)
* #766 - use ordinal string operations (Rob-Hague)
* #767 - Avoid string conversions in FieldMap.Get{FieldType} where possible (Rob-Hague)

* #785 - use correct SocketError "Shutdown" code when socket is deliberately shutdown (oclancy)

### v1.11.2:
* same as v1.11.1, but I fixed the readme in the pushed nuget packages
Expand Down

0 comments on commit 07a94c5

Please sign in to comment.