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