diff --git a/punchd.nim b/punchd.nim index a61b963..2acd7a7 100644 --- a/punchd.nim +++ b/punchd.nim @@ -58,8 +58,8 @@ proc acceptConnections(punchd: Punchd, ip: IpAddress, port: Port, let peer = acceptFuture.read() let (peerAddr, peerPort) = peer.getPeerAddr() let peerIp = parseIpAddress(peerAddr) - let query = Attempt(srcIp: ip, srcPort: port, dstIp: peerIp, - dstPorts: @[peerPort]) + let query = Attempt(protocol: protocol, srcIp: ip, srcPort: port, + dstIp: peerIp, dstPorts: @[peerPort]) let i = punchd.attempts.find(query) if i == -1: echo "Accepted connection, but no attempt found. Discarding."