Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(987)

Issue 455029: Map EPIPE to ERR_CONNECTION_RESET. (Closed)

Created:
11 years ago by wtc
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review)
Visibility:
Public.

Description

Map EPIPE to ERR_CONNECTION_RESET. R=willchan BUG=29241 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33633

Patch Set 1 #

Patch Set 2 : Map EPIPE to ERR_CONNECTION_ABORTED #

Patch Set 3 : Still map EPIPE to ERR_CONNECTION_RESET #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M net/socket/tcp_client_socket_libevent.cc View 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
wtc
See the following links on why EPIPE should be mapped to ERR_CONNECTION_RESET. 1. NSPR maps ...
11 years ago (2009-12-02 02:50:24 UTC) #1
willchan no longer on Chromium
On 2009/12/02 02:50:24, wtc wrote: > See the following links on why EPIPE should be ...
11 years ago (2009-12-02 19:59:39 UTC) #2
wtc
I don't remember why NSPR maps EPIPE to PR_CONNECT_RESET_ERROR. I definitely didn't inspect the TCP ...
11 years ago (2009-12-02 23:57:21 UTC) #3
wtc
On 2009/12/02 19:59:39, willchan wrote: > EPIPE typically is caused by > programmer error, not ...
11 years ago (2009-12-03 00:02:35 UTC) #4
willchan no longer on Chromium
11 years ago (2009-12-03 00:17:51 UTC) #5
On 2009/12/03 00:02:35, wtc wrote:
> On 2009/12/02 19:59:39, willchan wrote:
> > EPIPE typically is caused by
> > programmer error, not by TCP connection resets.
> 
> This is not true.  EPIPE (or rather SIGPIPE) is caused by
> network connection closure by the peer.  Every network client
> program must ignore SIGPIPE because the default signal action
> for SIGPIPE is to terminate the program.  A client program
> with no progammer error will still receive SIGPIPE because of
> a server's action.

I was incredulous so I tested it out, and you're indeed correct.  Even more so,
the server sends a TCP RST in this case (I verified on wireshark).  I also
tested changing the server to write() to the socket after it closed it and that
gave an EBADF, so that was the other situation I was worried about.  I guess I'm
fine with going ahead and using ERR_CONNECTION_RESET here.  Sorry for my
incorrect objection.

LGTM.

Powered by Google App Engine
This is Rietveld 408576698