]> Cypherpunks repositories - gostls13.git/commit
netchan: fix locking bug.
authorRob Pike <r@golang.org>
Tue, 2 Nov 2010 17:58:27 +0000 (10:58 -0700)
committerRob Pike <r@golang.org>
Tue, 2 Nov 2010 17:58:27 +0000 (10:58 -0700)
commit59315fbfb5cc24fc130ed683c8be10bc659d3808
treed8f3d9adc814bedaf993fa6f10a966563c466894
parent396228a6525b211e0c368f255724eeefef264062
netchan: fix locking bug.
There's no need to hold the client mutex when calling encode, since encode itself
uses a mutex to make the writes atomic.  However, we need to keep
the messages ordered, so add a mutex for that purpose alone.
Fixes #1244.

R=rsc
CC=golang-dev
https://golang.org/cl/2833041
src/pkg/netchan/export.go