def connectionLost(self, reason=None):
        """
        Cleans up my socket.

        @param reason: Ignored.  Do not use this.
        """
        log.msg('(Tuntap %s Closed)' % self.interface)
        abstract.FileDescriptor.connectionLost(self, reason)
        self.protocol.doStop()
        self.connected = 0
        self._system.close(self._fileno)
        self._fileno = -1

        Cleans up my socket.

        @param reason: Ignored.  Do not use this.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/pair/tuntap.py