fix: golint errors

This commit is contained in:
braginini
2021-05-19 10:58:21 +02:00
parent f0048d16fb
commit 5342f10e7f
5 changed files with 23 additions and 14 deletions

View File

@@ -159,10 +159,8 @@ func (conn *Connection) Open(timeout time.Duration) error {
}
// wait until connection has been closed
select {
case <-conn.closeCond.C:
return fmt.Errorf("connection to peer %s has been closed", conn.Config.RemoteWgKey.String())
}
<-conn.closeCond.C
return fmt.Errorf("connection to peer %s has been closed", conn.Config.RemoteWgKey.String())
}
// Close Closes a peer connection