This commit is contained in:
crusader
2018-04-19 22:46:49 +09:00
parent f76a10dcd1
commit 2efb6bf2ce
2 changed files with 12 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ package servlet
import (
"net"
logging "git.loafle.net/commons/logging-go"
"git.loafle.net/commons/logging-go"
crp "git.loafle.net/commons/rpc-go/protocol"
crpj "git.loafle.net/commons/rpc-go/protocol/json"
crr "git.loafle.net/commons/rpc-go/registry"
@@ -73,7 +73,11 @@ func (s *RPCServlets) Handle(servletCtx server.ServletCtx,
}
writeChan <- replyBuff
case buf := <-s.RPCWriteChan:
case buf, ok := <-s.RPCWriteChan:
if !ok {
break
}
writeChan <- buf
case <-stopChan:
return