Skip to content

Commit d381a2d

Browse files
authored
TS-4522: check EPIPE instead r==0
man 2 write, Return value, On Success, the number of bytes written is returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately.
1 parent 52843c0 commit d381a2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iocore/net/UnixNetVConnection.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
535535
}
536536
return;
537537
}
538-
if (!r || r == -ECONNRESET) {
538+
if (r == -EPIPE || r == -ECONNRESET) {
539539
vc->write.triggered = 0;
540540
write_signal_done(VC_EVENT_EOS, nh, vc);
541541
return;

0 commit comments

Comments
 (0)