def process_close(self, val): self.closed = 1 if not self.close_sent: my_close = zdefs.Close() my_close.closeReason = zdefs.CloseReason.get_num_from_name( 'responseToPeer') self.send_PDU('close', my_close) self.transport.loseConnection()
def process_close(self, creq): close = zdefs.Close() close.closeReason = zdefs.CloseReason.get_num_from_name( 'responseToPeer') self.send_PDU('close', close) self.transport.loseConnection()