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

add more logs

This commit is contained in:
源文雨
2023-08-03 21:54:01 +08:00
parent a1bd09d107
commit 7060caa355
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ func (m *Me) listenthread(conn *net.UDPConn, mu *sync.Mutex) {
addt := packet.AdditionalData()
packet.Data = p.DecodePreshared(addt, packet.Data)
if packet.Data == nil {
logrus.Debugln("[listen] drop invalid additional data packet:", addt)
logrus.Debugln("[listen] drop invalid preshared packet, addt:", addt)
packet.Put()
continue
}

View File

@@ -14,7 +14,7 @@ import (
func (l *Link) WriteAndPut(p *head.Packet, istransfer bool) (n int, err error) {
teatype := uint8(rand.Intn(16))
sndcnt := atomic.AddUintptr(&l.sendcount, 1)
logrus.Debugln("[send] count:", sndcnt, "additional data:", uint16(sndcnt))
logrus.Debugln("[send] count:", sndcnt, ", additional data:", uint16(sndcnt))
if len(p.Data) <= int(l.mtu) {
if !istransfer {
p.FillHash()