summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <[email protected]>2012-05-08 23:03:45 -0400
committerAndrew Gallant (Ocelot) <[email protected]>2012-05-08 23:03:45 -0400
commitc1fa321d4ca763f62bc70504fc748a3b3e0e1c40 (patch)
treec55e36d2a8bcdcfd961c6bfbebde03993f7ad8a3
parenta0f1a15e23283b11892de05c73a6aa3be0901f00 (diff)
fixed nasty bug that made XGB not thread safe
-rw-r--r--xgb.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/xgb.go b/xgb.go
index b2bf84b..8baa208 100644
--- a/xgb.go
+++ b/xgb.go
@@ -303,8 +303,8 @@ func (c *Conn) readResponses() {
replyBytes []byte
)
- buf := make([]byte, 32)
for {
+ buf := make([]byte, 32)
err, event, seq = nil, nil, 0
if _, err := io.ReadFull(c.conn, buf); err != nil {