mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-27 06:10:26 +08:00
chore: make lint happy
This commit is contained in:
@@ -86,8 +86,12 @@ func (l *Link) onQuery(packet []byte) {
|
||||
if len(notify) > 0 {
|
||||
logrus.Infoln("[nat] query wrap", len(notify), "notify")
|
||||
w := helper.SelectWriter()
|
||||
json.NewEncoder(w).Encode(¬ify)
|
||||
l.WriteAndPut(head.NewPacket(head.ProtoNotify, l.me.srcport, l.peerip, l.me.dstport, w.Bytes()), false)
|
||||
_ = json.NewEncoder(w).Encode(¬ify)
|
||||
_, err = l.WriteAndPut(head.NewPacket(head.ProtoNotify, l.me.srcport, l.peerip, l.me.dstport, w.Bytes()), false)
|
||||
if err != nil {
|
||||
logrus.Errorln("[nat] notify peer", l, "err:", err)
|
||||
return
|
||||
}
|
||||
helper.PutWriter(w)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user