Skip to content

Commit

Permalink
exclude ping type in clients
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemeowx2 committed Oct 10, 2018
1 parent e1feefc commit 45e4a35
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/src/udpserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ export class SLPServer {
return
}
this.byteLastSec += msg.byteLength
this.clients.set(addr2str(rinfo), {
expireAt: Date.now() + Timeout,
rinfo
})

const type: ForwarderType = msg.readUInt8(0)
if (type != ForwarderType.Ping) {
this.clients.set(addr2str(rinfo), {
expireAt: Date.now() + Timeout,
rinfo
})
}
this.onPacket(rinfo, type, msg.slice(1), msg)
// this.sendBroadcast(rinfo, msg)
}
Expand Down

0 comments on commit 45e4a35

Please sign in to comment.