siemens / mtda

Multi-Tenant Device Access
Other
35 stars 22 forks source link

fix(usbrelay): poll for status to confirm #374

Closed fmoessbauer closed 9 months ago

fmoessbauer commented 9 months ago

The usbrelay command is async, hence we cannot immediately after changing the state check if it became active. Instead, we need to poll for some time and report back either if the state changed, or on timeout. To leave sufficent time for other parts of the code, we check until half of the RPC timeout is expired.