diff options
author | Peter Harris <git@peter.is-a-geek.org> | 2010-12-28 20:10:38 -0500 |
---|---|---|
committer | Peter Harris <git@peter.is-a-geek.org> | 2010-12-28 20:30:07 -0500 |
commit | e76358414010b587db5d2e0a7e3775a2232edf89 (patch) | |
tree | b70d2102aaadc3cd353a84c6ceb67acdc32b7e35 | |
parent | 8a31a4fcff4840b3dbb3ecb74991df42eab50263 (diff) |
Take write lock in Flush()
-rw-r--r-- | xgob.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -409,6 +409,9 @@ func (c *Connection) Flush () { return } + c.writeMutex.Lock() + defer c.writeMutex.Unlock() + c.out.Flush() } |