more fixes.

This commit is contained in:
Sarah 2021-10-17 03:04:22 +02:00
parent cc8abec5a0
commit d112cf8796
No known key found for this signature in database
GPG key ID: 708F7ACE058F0186
2 changed files with 1 additions and 3 deletions

View file

@ -16,8 +16,7 @@ async def _setup_stores(local_port: int):
global l_access, r_access global l_access, r_access
async with local() as l: async with local() as l:
l_access = PrefixStore("local/nar", l) l_access = PrefixStore("local/nar", l)
lp = PrefixStore("local", l) async with remote(l_access, local_port, "0.0.0.0") as r:
async with remote(lp, local_port, "0.0.0.0") as r:
r_access = PrefixStore("remote", r) r_access = PrefixStore("remote", r)
yield yield
setup_store = _setup_stores(12304) setup_store = _setup_stores(12304)

View file

@ -53,7 +53,6 @@ class DiscoveryProtocol(asyncio.DatagramProtocol, Store):
self.transport = transport self.transport = transport
def datagram_received(self, data: bytes, addr: t.Tuple[str, int]) -> None: def datagram_received(self, data: bytes, addr: t.Tuple[str, int]) -> None:
print(set(get_myself()))
if addr[0] in set(get_myself()): if addr[0] in set(get_myself()):
print(f"Ignoring packet from {addr[0]}") print(f"Ignoring packet from {addr[0]}")
return return