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

Issue 2107048: code review 2107048: crypto/tls: don't return an error from Close() (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by agl1
Modified:
13 years, 6 months ago
Reviewers:
CC:
adg, rsc1, golang-dev
Visibility:
Public.

Description

crypto/tls: don't return an error from Close() Fixes issue 1037.

Patch Set 1 #

Patch Set 2 : code review 2107048: crypto/tls: don't return an error from Close() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M src/pkg/crypto/tls/conn.go View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 5
agl1
13 years, 6 months ago (2010-09-10 18:43:20 UTC) #1
rsc1
LGTM
13 years, 6 months ago (2010-09-10 18:52:18 UTC) #2
agl1
Hello adg, rsc1 (cc: golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 6 months ago (2010-09-10 19:55:33 UTC) #3
agl1
*** Submitted as http://code.google.com/p/go/source/detail?r=3e3126063f68 *** crypto/tls: don't return an error from Close() Fixes issue 1037. ...
13 years, 6 months ago (2010-09-10 19:55:53 UTC) #4
adg
13 years, 6 months ago (2010-09-11 10:36:54 UTC) #5
LGTM

On 11 September 2010 04:43,  <agl@golang.org> wrote:
> Reviewers: adg,
>
> Description:
> crypto/tls: don't return an error from Close()
>
> Fixes issue 1037.
>
> Please review this at http://codereview.appspot.com/2107048/
>
> Affected files:
>  M src/pkg/crypto/tls/conn.go
>
>
> Index: src/pkg/crypto/tls/conn.go
> ===================================================================
> --- a/src/pkg/crypto/tls/conn.go
> +++ b/src/pkg/crypto/tls/conn.go
> @@ -445,7 +445,11 @@
>        }
>        c.tmp[1] = byte(err)
>        c.writeRecord(recordTypeAlert, c.tmp[0:2])
> -       return c.setError(&net.OpError{Op: "local error", Error: err})
> +       // closeNotify is a special case in that it isn't an error:
> +       if err != alertCloseNotify {
> +               return c.setError(&net.OpError{Op: "local error", Error:
> err})
> +       }
> +       return nil
>  }
>
>  // sendAlert sends a TLS alert message.
>
>
>
Sign in to reply to this message.

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