Improve protocol tests, close handling

This commit is contained in:
Jakob Borg
2016-01-12 09:19:44 +01:00
parent 7427b9de35
commit 9595687bce
3 changed files with 25 additions and 21 deletions

View File

@@ -691,6 +691,7 @@ func (c *rawConnection) writerLoop() {
func (c *rawConnection) close(err error) {
c.once.Do(func() {
l.Debugln("close due to", err)
close(c.closed)
c.awaitingMut.Lock()