Agent: Add docstrings to notify_relay_on_propagation
This commit is contained in:
parent
d3ff56138f
commit
a8383f4a79
|
@ -8,10 +8,22 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class notify_relay_on_propagation:
|
class notify_relay_on_propagation:
|
||||||
|
"""
|
||||||
|
Notifies a TCPRelay of potential relay users if propagation is successful
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, tcp_relay: Optional[TCPRelay]):
|
def __init__(self, tcp_relay: Optional[TCPRelay]):
|
||||||
|
"""
|
||||||
|
:param tcp_relay: A TCPRelay to notify on successful propagation
|
||||||
|
"""
|
||||||
self._tcp_relay = tcp_relay
|
self._tcp_relay = tcp_relay
|
||||||
|
|
||||||
def __call__(self, event: PropagationEvent):
|
def __call__(self, event: PropagationEvent):
|
||||||
|
"""
|
||||||
|
Notify a TCPRelay of potential relay users if propagation is successful
|
||||||
|
|
||||||
|
:param event: A `PropagationEvent`
|
||||||
|
"""
|
||||||
if self._tcp_relay is None:
|
if self._tcp_relay is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue