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

Update SocketReader::ReadSome SocketError when socket closed #785

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading