Skip to content
Snippets Groups Projects
Commit a47ddc0b authored by Martin Teichmann's avatar Martin Teichmann
Browse files

use transport.close to close the NETLINK socket

this seems to be a subtle change in recent versions of Python
parent db9e9d72
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,10 @@ class XDRFD(DatagramProtocol):
self.future.set_exception(e)
raise
def error_received(self, exception):
if not self.future.done():
self.future.set_exception(exception)
class PacketArray:
"""access a packet like a Python array"""
......@@ -241,7 +245,7 @@ class XDP(EBPF):
try:
await future
finally:
transport.get_extra_info("socket").close()
transport.close()
async def attach(self, network, flags=XDPFlags.SKB_MODE):
"""attach this program to a ``network``
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment