diff options
| author | aarzilli <[email protected]> | 2015-11-08 10:56:15 +0100 |
|---|---|---|
| committer | aarzilli <[email protected]> | 2015-11-08 10:56:15 +0100 |
| commit | ebcb4535ccc1f92f5cfaf7f763fd62143e95054c (patch) | |
| tree | 3272afd2cf4c351ca28f11150b4511a53298a475 | |
| parent | 3ac861bb079d75ef8b6f2734f7e1f1e6563d95cc (diff) | |
sendRequest reads req.buf after closing req.seq
NewRequest says you can avoid reallocating a new buffer for each request by calling it directly.
This is not true if req.seq is closed before req.buf is read.
| -rw-r--r-- | xgb.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -337,9 +337,9 @@ func (c *Conn) sendRequests() { } } req.cookie.Sequence = c.newSequenceId() - close(req.seq) c.cookieChan <- req.cookie c.writeBuffer(req.buf) + close(req.seq) } response := make(chan struct{}) c.closing <- response |
