From 36b5f1ec3bf18af407d84ff605347e90dade7411 Mon Sep 17 00:00:00 2001 From: elie Date: Sat, 7 Mar 2015 22:36:29 +0000 Subject: shutdown transport from closeTransport() --- pysnmp/carrier/asyncio/dgram/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pysnmp/carrier/asyncio/dgram/base.py b/pysnmp/carrier/asyncio/dgram/base.py index 01a9e30..25b64a2 100644 --- a/pysnmp/carrier/asyncio/dgram/base.py +++ b/pysnmp/carrier/asyncio/dgram/base.py @@ -77,3 +77,9 @@ class DgramAsyncioProtocol(asyncio.DatagramProtocol, AbstractAsyncioTransport): self.transport.sendto(outgoingMessage, transportAddress) except Exception: raise error.CarrierError(';'.join(traceback.format_exception(*sys.exc_info()))) + + def closeTransport(self): + if self.transport is not None: + self.transport.close() + AbstractAsyncioTransport.closeTransport(self) + -- cgit v1.2.1