2
0
mirror of https://github.com/soheilhy/cmux.git synced 2024-11-10 19:51:52 +08:00

use param for recieve only chan

Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
This commit is contained in:
Abhilash Gnan 2020-05-21 08:19:44 +02:00 committed by Soheil Hassas Yeganeh
parent a192073df5
commit 3c0ee784ab

View File

@ -199,7 +199,7 @@ func (m *cMux) serve(c net.Conn, donec <-chan struct{}, wg *sync.WaitGroup) {
}
select {
case sl.l.connc <- muc:
case <-m.donec:
case <-donec:
_ = c.Close()
}
return