mirror of
https://github.com/espressif/openthread.git
synced 2026-07-24 13:04:07 +00:00
[toranj] perform a subprocess.poll() on wpantund instance during init of nodes (#2901)
This allows the underlying wpantund process associated with a `Node` instance to be executed while we are waiting for it to be initialized. It also protects against any unexpected termination of an instance. This change would help with speed of initialization of all nodes mainly when there are many instances running in parallel.
This commit is contained in:
committed by
Jonathan Hui
parent
8e28b626a9
commit
ffc2b972ab
@@ -491,6 +491,9 @@ class Node(object):
|
||||
start_time = time.time()
|
||||
while True:
|
||||
try:
|
||||
node._wpantund_process.poll()
|
||||
if node._wpantund_process.returncode is not None:
|
||||
print 'Node {} wpantund instance has terminated unexpectedly'.format(node)
|
||||
if disable_logs:
|
||||
node.set(WPAN_OT_LOG_LEVEL, '0')
|
||||
node.leave()
|
||||
|
||||
Reference in New Issue
Block a user