We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5549947 commit 5b95799Copy full SHA for 5b95799
1 file changed
src/network.c
@@ -550,13 +550,16 @@ int net_close(stream *str)
550
int ok = 0;
551
552
#ifdef pclose
553
- if (str->is_pipe)
+ if (str->is_pipe) {
554
ok = pclose(str->fp);
555
- else
+ str->is_pipe = false;
556
+ } else
557
#else
558
{
- if (str->is_socket)
559
+ if (str->is_socket) {
560
shutdown(fileno(str->fp), SHUT_RDWR);
561
+ str->is_socket = false;
562
+ }
563
564
ok = fclose(str->fp);
565
0 commit comments