This commit is contained in:
TenderIronh
2023-05-07 20:42:06 +08:00
parent cd415e7bf4
commit b667e5b766
12 changed files with 34 additions and 25 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ func (t *P2PTunnel) requestPeerInfo() error {
t.pn.write(MsgQuery, MsgQueryPeerInfoReq, &QueryPeerInfoReq{t.config.peerToken, t.config.PeerNode})
head, body := t.pn.read("", MsgQuery, MsgQueryPeerInfoRsp, time.Second*10)
if head == nil {
return ErrPeerOffline
return ErrNetwork // network error, should not be ErrPeerOffline
}
rsp := QueryPeerInfoRsp{}
err := json.Unmarshal(body, &rsp)