Skip to content

Commit

Permalink
was/IdleConnection: use erno for pipe errors
Browse files Browse the repository at this point in the history
This reverts part of 8f62a7c
  • Loading branch information
MaxKellermann committed Jan 16, 2025
1 parent b23efee commit 8315017
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/was/IdleConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// author: Max Kellermann <[email protected]>

#include "IdleConnection.hxx"
#include "system/Error.hxx"
#include "net/SocketError.hxx"
#include "net/SocketProtocolError.hxx"

Expand Down Expand Up @@ -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"};

Expand Down

0 comments on commit 8315017

Please sign in to comment.