Skip to content

Commit

Permalink
proto_pipe.c: check for an error in shutdown()
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva authored and cperciva committed Apr 18, 2022
1 parent 88dcd94 commit 92aab18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/proto/proto_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "netbuf.h"
#include "network.h"
#include "warnp.h"

#include "proto_crypt.h"

Expand Down Expand Up @@ -163,7 +164,10 @@ callback_pipe_read(void * cookie, int status)

eof:
/* We aren't going to write any more. */
shutdown(P->s_out, SHUT_WR);
if (shutdown(P->s_out, SHUT_WR)) {
warnp("shutdown");
goto err0;
}

/* Record that we have reached EOF. */
*(P->status) = 0;
Expand Down

0 comments on commit 92aab18

Please sign in to comment.