-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
was/IdleConnection: use erno for pipe errors
This reverts part of 8f62a7c
- Loading branch information
1 parent
b23efee
commit 8315017
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
// author: Max Kellermann <[email protected]> | ||
|
||
#include "IdleConnection.hxx" | ||
#include "system/Error.hxx" | ||
#include "net/SocketError.hxx" | ||
#include "net/SocketProtocolError.hxx" | ||
|
||
|
@@ -73,7 +74,7 @@ WasIdleConnection::DiscardInput(uint64_t remaining) | |
dest = dest.first(remaining); | ||
ssize_t nbytes = socket.input.Read(dest); | ||
if (nbytes < 0) | ||
throw MakeSocketError("error on idle WAS input pipe"); | ||
throw MakeErrno("error on idle WAS input pipe"); | ||
else if (nbytes == 0) | ||
throw SocketClosedPrematurelyError{"WAS input pipe closed unexpectedly"}; | ||
|
||
|