FAQ
Hello dvyukov@google.com, agl@golang.org (cc:
golang-dev@googlegroups.com),

Please take another look.


http://codereview.appspot.com/6497070/

Search Discussions

  • Dave at Sep 6, 2012 at 1:11 am
    Thank you for your comments. PTAL.


    https://codereview.appspot.com/6497070/diff/6001/src/pkg/crypto/tls/conn.go
    File src/pkg/crypto/tls/conn.go (right):

    https://codereview.appspot.com/6497070/diff/6001/src/pkg/crypto/tls/conn.go#newcode47
    src/pkg/crypto/tls/conn.go:47: err
    On 2012/09/05 14:31:30, agl1 wrote:
    err is always a variable name for an error and using it as a struct
    name tripped
    me up.
    connErr?
    STGM. PTAL.

    https://codereview.appspot.com/6497070/diff/6001/src/pkg/crypto/tls/conn.go#newcode747
    src/pkg/crypto/tls/conn.go:747: if err := c.setError(c.Handshake()); err
    != nil {
    On 2012/09/05 12:41:39, dvyukov wrote:
    Somewhat obscure on my taste. I would write something along the lines of:
    if err := c.Handshake; err != nil {
    return 0, c.setError(err)
    }
    Your current use also requires err != nil check in setError(),
    otherwise you
    will lock/unlock/defer on every Write.
    Done.

    https://codereview.appspot.com/6497070/
  • Dvyukov at Sep 6, 2012 at 6:36 am
  • Dave at Sep 6, 2012 at 7:50 am
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=91c1c2d6e2ff ***

    crypto/tls: fix data race on conn.err

    Fixes issue 3862.

    There were many areas where conn.err was being accessed
    outside the mutex. This proposal moves the err value to
    an embedded struct to make it more obvious when the error
    value is being accessed.

    As there are no Benchmark tests in this package I cannot
    feel confident of the impact of this additional locking,
    although most will be uncontended.

    R=dvyukov, agl
    CC=golang-dev
    http://codereview.appspot.com/6497070


    http://codereview.appspot.com/6497070/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 6, '12 at 1:05a
activeSep 6, '12 at 7:50a
posts4
users2
websitegolang.org

2 users in discussion

Dave: 3 posts Dvyukov: 1 post

People

Translate

site design / logo © 2022 Grokbase