From 281fec1b2d9b8bed9b4480f2802f5e80ab9f2a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C3=BCth?= Date: Wed, 22 Nov 2017 09:54:03 +0100 Subject: [PATCH] Make error chan not block for a single write, allowing ParseHandshakeMessage goroutine to gracefully exit --- internal/handshake/crypto_setup_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handshake/crypto_setup_client.go b/internal/handshake/crypto_setup_client.go index c923bbc3..78ec12b9 100644 --- a/internal/handshake/crypto_setup_client.go +++ b/internal/handshake/crypto_setup_client.go @@ -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 {