ing
This commit is contained in:
parent
5e42fbc185
commit
adb8b71fd1
|
@ -10,8 +10,7 @@ import (
|
|||
|
||||
func connReadHandler(readWriteHandler ReadWriteHandler, conn Conn, stopChan <-chan struct{}, doneChan chan<- error, readChan chan<- []byte) {
|
||||
var (
|
||||
message []byte
|
||||
err error
|
||||
err error
|
||||
)
|
||||
|
||||
defer func() {
|
||||
|
@ -37,6 +36,7 @@ func connReadHandler(readWriteHandler ReadWriteHandler, conn Conn, stopChan <-ch
|
|||
})
|
||||
|
||||
for {
|
||||
var message []byte
|
||||
readMessageChan := make(chan struct{})
|
||||
|
||||
go func() {
|
||||
|
@ -46,7 +46,6 @@ func connReadHandler(readWriteHandler ReadWriteHandler, conn Conn, stopChan <-ch
|
|||
|
||||
select {
|
||||
case <-stopChan:
|
||||
<-readMessageChan
|
||||
return
|
||||
case <-readMessageChan:
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user