fix
This commit is contained in:
parent
5b57087ea2
commit
7af3b235e7
@ -31,8 +31,15 @@ struct ARPPacket {
|
||||
var targetMAC: Data
|
||||
var targetIP: UInt32
|
||||
|
||||
init(hardwareType: UInt16, protocolType: UInt16, hardwareSize: UInt8, protocolSize: UInt8, opcode: Opcode,
|
||||
senderMAC: Data, senderIP: UInt32, targetMAC: Data, targetIP: UInt32) {
|
||||
init(hardwareType: UInt16,
|
||||
protocolType: UInt16,
|
||||
hardwareSize: UInt8,
|
||||
protocolSize: UInt8,
|
||||
opcode: Opcode,
|
||||
senderMAC: Data,
|
||||
senderIP: UInt32,
|
||||
targetMAC: Data,
|
||||
targetIP: UInt32) {
|
||||
|
||||
self.hardwareType = hardwareType
|
||||
self.protocolType = protocolType
|
||||
|
||||
@ -544,7 +544,7 @@ public class SDLContext: @unchecked Sendable {
|
||||
publisher.send(request)
|
||||
} else {
|
||||
let publisher = PassthroughSubject<RegisterRequest, Never>()
|
||||
publisher.debounce(for: .seconds(5), scheduler: DispatchQueue.global())
|
||||
publisher.throttle(for: .seconds(5), scheduler: DispatchQueue.global(), latest: true)
|
||||
.sink { request in
|
||||
Task {
|
||||
await self.tryHole(request: request)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user