summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/rpc_transport_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_client/rpc_transport_sock.c b/source3/rpc_client/rpc_transport_sock.c
index 3756f73e50..4ab6500900 100644
--- a/source3/rpc_client/rpc_transport_sock.c
+++ b/source3/rpc_client/rpc_transport_sock.c
@@ -82,7 +82,7 @@ static void rpc_sock_read_done(struct tevent_req *subreq)
state->received = async_recv_recv(subreq, &err);
if (state->received == -1) {
- if (err == EPIPE) {
+ if (state->transp->fd != -1) {
close(state->transp->fd);
state->transp->fd = -1;
}
@@ -152,7 +152,7 @@ static void rpc_sock_write_done(struct tevent_req *subreq)
state->sent = async_send_recv(subreq, &err);
if (state->sent == -1) {
- if (err == EPIPE) {
+ if (state->transp->fd != -1) {
close(state->transp->fd);
state->transp->fd = -1;
}