lib/protocol: Don't close asyncMessage.done on success (fixes #5674) (#5675)

This commit is contained in:
Simon Frei 2019-04-29 17:52:57 +02:00 committed by Jakob Borg
parent 0ca1f26ff8
commit 19b51c9b92
1 changed files with 2 additions and 2 deletions

View File

@ -641,9 +641,9 @@ func (c *rawConnection) handleResponse(resp Response) {
c.awaitingMut.Unlock()
}
func (c *rawConnection) send(msg message, done chan struct{}) bool {
func (c *rawConnection) send(msg message, done chan struct{}) (sent bool) {
defer func() {
if done != nil {
if !sent && done != nil {
close(done)
}
}()