Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14080)

Issue 7518052: rpc: continue after error reading body

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by rog
Modified:
11 years ago
Reviewers:
dimitern, dave, mp+155825
Visibility:
Public.

Description

rpc: continue after error reading body If we get an error reading an rpc message body, it's likely because of a syntax error issue rather than anything fundamental, so we return an error rather than dropping the connection. https://code.launchpad.net/~rogpeppe/juju-core/261-rpc-do-not-abort-on-body-error/+merge/155825 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : rpc: continue after error reading body #

Total comments: 2

Patch Set 3 : rpc: continue after error reading body #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -21 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M rpc/rpc_test.go View 9 chunks +47 lines, -20 lines 0 comments Download
M rpc/server.go View 1 2 1 chunk +24 lines, -1 line 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 1 month ago (2013-03-27 18:18:55 UTC) #1
dimitern
LGTM. Could this possibly be related to bug #1135452?
11 years, 1 month ago (2013-03-27 18:33:16 UTC) #2
dave_cheney.net
LGTM with a request for clarification. https://codereview.appspot.com/7518052/diff/2001/rpc/server.go File rpc/server.go (right): https://codereview.appspot.com/7518052/diff/2001/rpc/server.go#newcode142 rpc/server.go:142: if err == ...
11 years, 1 month ago (2013-03-27 23:18:27 UTC) #3
rog
11 years ago (2013-04-03 13:27:10 UTC) #4
*** Submitted:

rpc: continue after error reading body

If we get an error reading an rpc message body,
it's likely because of a syntax error issue rather
than anything fundamental, so we return
an error rather than dropping the connection.

R=dimitern, dfc
CC=
https://codereview.appspot.com/7518052

https://codereview.appspot.com/7518052/diff/2001/rpc/server.go
File rpc/server.go (right):

https://codereview.appspot.com/7518052/diff/2001/rpc/server.go#newcode142
rpc/server.go:142: if err == io.EOF || err == io.ErrUnexpectedEOF {
On 2013/03/27 23:18:27, dfc wrote:
> io.EOF is expected, but could you give a few words why we expect the
unexpected
> io.ErrUnexpectedEOF ?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b