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

Issue 6852085: code review 6852085: net: never return -1 bytes read from netFD.Read (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by dave
Modified:
11 years, 5 months ago
Reviewers:
CC:
bradfitz, mikio, dvyukov, rsc, golang-dev
Visibility:
Public.

Description

net: never return -1 bytes read from netFD.Read If the a network read would block, and a packet arrived just before the timeout expired, then the number of bytes from the previous (blocking) read, -1, would be returned. This change restores the previous logic, where n would be unconditionally set to 0 if err != nil, but was skipped due to a change in CL 6851096. The test for this change is CL 6851061.

Patch Set 1 #

Patch Set 2 : diff -r db11b6a8c8f9 https://code.google.com/p/go #

Patch Set 3 : diff -r db11b6a8c8f9 https://code.google.com/p/go #

Patch Set 4 : diff -r cd3ad8805953 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M src/pkg/net/fd_unix.go View 1 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4
dave_cheney.net
Hello bradfitz@golang.org, mikioh.mikioh@gmail.com, dvyukov@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 5 months ago (2012-11-25 11:43:18 UTC) #1
rsc
LGTM
11 years, 5 months ago (2012-11-25 16:18:11 UTC) #2
bradfitz
LGTM nice, thanks! On Sun, Nov 25, 2012 at 3:43 AM, <dave@cheney.net> wrote: > Reviewers: ...
11 years, 5 months ago (2012-11-25 17:19:17 UTC) #3
dave_cheney.net
11 years, 5 months ago (2012-11-25 23:59:51 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=03a6b8c9c396 ***

net: never return -1 bytes read from netFD.Read

If the a network read would block, and a packet arrived just before the timeout
expired, then the number of bytes from the previous (blocking) read, -1, would
be returned.

This change restores the previous logic, where n would be unconditionally set to
0 if err != nil, but was skipped due to a change in CL 6851096.

The test for this change is CL 6851061.

R=bradfitz, mikioh.mikioh, dvyukov, rsc
CC=golang-dev
http://codereview.appspot.com/6852085
Sign in to reply to this message.

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