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.
This commit is contained in:
parent
5451e59f88
commit
baff8c1906
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user