mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-15 08:14:46 +08:00
1.优化网络库
2.rpc协议在宕机时不会导致整个rpc无法响应
This commit is contained in:
@@ -247,7 +247,12 @@ func (slf *SClient) onsend(){
|
||||
}
|
||||
|
||||
pPackData := pack.(*MsgBasePack)
|
||||
slf.conn.Write(pPackData.Bytes())
|
||||
_,e := slf.conn.Write(pPackData.Bytes())
|
||||
if e!=nil {
|
||||
service.GetLogger().Printf(service.LEVER_DEBUG, "clent id %d write error...",slf.id)
|
||||
return
|
||||
}
|
||||
//fmt.Print("xxxxxxxxxxxxxxx:",n,e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user