From 98fb5f44acd428ca93e550b276852334c320c492 Mon Sep 17 00:00:00 2001 From: Newt Date: Tue, 12 Nov 2024 15:32:23 +0800 Subject: [PATCH] refactor: simplify channel send by removing unnecessary nil check --- muxer/muxer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/muxer/muxer.go b/muxer/muxer.go index dac7b76e..31382361 100644 --- a/muxer/muxer.go +++ b/muxer/muxer.go @@ -333,9 +333,8 @@ func (m *Muxer) readLoop() { ) return } - if recvChan != nil { - recvChan <- msg - } + recvChan <- msg + // Wait until the muxer is started to continue // We don't want to read more than one segment until the handshake is complete if !started {