Skip to content

Commit 5b95799

Browse files
committed
WIP
1 parent 5549947 commit 5b95799

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/network.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,13 +550,16 @@ int net_close(stream *str)
550550
int ok = 0;
551551

552552
#ifdef pclose
553-
if (str->is_pipe)
553+
if (str->is_pipe) {
554554
ok = pclose(str->fp);
555-
else
555+
str->is_pipe = false;
556+
} else
556557
#else
557558
{
558-
if (str->is_socket)
559+
if (str->is_socket) {
559560
shutdown(fileno(str->fp), SHUT_RDWR);
561+
str->is_socket = false;
562+
}
560563

561564
ok = fclose(str->fp);
562565

0 commit comments

Comments
 (0)