mirror of https://github.com/m-labs/artiq.git
artiq_devtool: detect a race condition during connect.
This commit is contained in:
parent
7af41bd29c
commit
b562b0fbc4
|
@ -116,6 +116,10 @@ def main():
|
|||
local_stream, peer_addr = listener.accept()
|
||||
logger.info("Accepting %s:%s and opening SSH channel to %s:%s",
|
||||
*peer_addr, args.ip, port)
|
||||
if get_ssh().get_transport() is None:
|
||||
logger.error("Trying to open a channel before the transport is ready!")
|
||||
continue
|
||||
|
||||
remote_stream = get_ssh().get_transport() \
|
||||
.open_channel('direct-tcpip', (args.ip, port), peer_addr)
|
||||
while True:
|
||||
|
|
Loading…
Reference in New Issue