Exemple #1
0
def disconnect():
    """
    """
    global _Listener
    from transport.tcp import tcp_interface
    if not _Listener:
        tcp_interface.interface_disconnected(None)
        return True
    _Listener.stopListening().addBoth(tcp_interface.interface_disconnected)
    _Listener = None
    return True
Exemple #2
0
def disconnect():
    """
    
    """
    global _Listener
    from transport.tcp import tcp_interface
    if not _Listener:
        tcp_interface.interface_disconnected(None)
        return True
    _Listener.stopListening().addBoth(tcp_interface.interface_disconnected)
    _Listener = None
    return True
Exemple #3
0
def disconnect():
    """
    """
    global _Listener
    from transport.tcp import tcp_interface
    if not _Listener:
        tcp_interface.interface_disconnected(None)
        return True
    _Listener.stopListening().addCallback(tcp_interface.interface_disconnected)
    _Listener.stopListening().addErrback(lambda *args: lg.warn(str(*args)))
    _Listener = None
    return True