1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-24 04:27:08 +08:00

fix recv err in win

This commit is contained in:
fumiama
2021-12-30 13:17:12 +08:00
parent a4036a76bb
commit 4a17d7cf13
4 changed files with 7 additions and 4 deletions

View File

@@ -60,11 +60,12 @@ func (m *Me) listen() (conn *net.UDPConn, err error) {
logrus.Infoln("[link] recv query")
p.onQuery(&packet)
case head.ProtoData:
logrus.Infoln("[link] deliver to", p.peerip)
if p.pipe != nil {
p.pipe <- &packet
logrus.Infoln("[link] deliver to pipe of", p.peerip)
} else {
m.pipe <- &packet
logrus.Infoln("[link] deliver to pipe of me")
}
default:
break