diff options
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/socket/noisesocket.go')
-rw-r--r-- | vendor/go.mau.fi/whatsmeow/socket/noisesocket.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go b/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go index 23bb44e8..85973d72 100644 --- a/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go +++ b/vendor/go.mau.fi/whatsmeow/socket/noisesocket.go @@ -47,6 +47,10 @@ func newNoiseSocket(fs *FrameSocket, writeKey, readKey cipher.AEAD, frameHandler } func (ns *NoiseSocket) consumeFrames(ctx context.Context, frames <-chan []byte) { + if ctx == nil { + // ctx being nil implies the connection already closed somehow + return + } ctxDone := ctx.Done() for { select { |