diff --git a/Sources/Punchnet/ARPPacket.swift b/Sources/Punchnet/ARPPacket.swift index ac3e9f6..b6a8076 100644 --- a/Sources/Punchnet/ARPPacket.swift +++ b/Sources/Punchnet/ARPPacket.swift @@ -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 diff --git a/Sources/Punchnet/SDLContext.swift b/Sources/Punchnet/SDLContext.swift index a023673..edf9bdf 100644 --- a/Sources/Punchnet/SDLContext.swift +++ b/Sources/Punchnet/SDLContext.swift @@ -544,7 +544,7 @@ public class SDLContext: @unchecked Sendable { publisher.send(request) } else { let publisher = PassthroughSubject() - 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)