fix return value of find*Attempt procs
This commit is contained in:
parent
84cb8611ef
commit
9e3b7fe987
|
@ -141,6 +141,7 @@ proc findConnectAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
|||
attempt.dstIp == dstIp and
|
||||
attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts):
|
||||
return index
|
||||
return -1
|
||||
|
||||
proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
||||
srcPort: Port, dstIp: IpAddress,
|
||||
|
@ -150,6 +151,7 @@ proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
|||
attempt.dstIp == dstIp and
|
||||
attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts):
|
||||
return index
|
||||
return -1
|
||||
|
||||
proc findAcceptAttemptsByLocalAddr(puncher: TcpSyniPuncher, address: IpAddress,
|
||||
port: Port): seq[AcceptAttempt] =
|
||||
|
|
Loading…
Reference in New Issue