Make error chan not block for a single write, allowing ParseHandshakeMessage goroutine to gracefully exit

This commit is contained in:
Jan Rüth
2017-11-22 09:54:03 +01:00
parent 214e95c655
commit 281fec1b2d

View File

@@ -102,7 +102,7 @@ func NewCryptoSetupClient(
func (h *cryptoSetupClient) HandleCryptoStream() error {
messageChan := make(chan HandshakeMessage)
errorChan := make(chan error)
errorChan := make(chan error, 1)
go func() {
for {