

def _writeConnectionLost(self, reason):
    self._writer = None
    if self.disconnecting:
        self.connectionLost(reason)
        return
    p = interfaces.IHalfCloseableProtocol(self.protocol, None)
    if p:
        try:
            p.writeConnectionLost()
        except:
            log.err()
            self.connectionLost(failure.Failure())

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/_posixstdio.py StandardIO._writeConnectionLost/original