Environment : SDK cloud, sandbox, nodejs v14.17.5, firstname.lastname@example.org
Summary : I have a problem with the remote-pay-cloud module-js. It don't have timeout between onDeviceConnected and onDeviceReady.
To recreate the "bug" :
- After successful transaction with terminal (connection, call command and dispose).
- Simulate communication problem, like disconnect ethernet cable (and no wireless connection).
- Rerun script, I have a onDeviceConnected, but never after... nothing... I can reconnect the ethernet cable. Nothing will be trigger. I can wait... some minutes, the script do nothing. (Note : Reconnect ethernet cable will not change anything.)
While script running and waiting for "onDeviceReady ", all other connections is refused (seems normal for security reason). I must kill process manually (like ctrl+c) to stop process
My question is : how I can detect than the script "hang", or instead, how I can explicit shutdown the process (to be add in, by example, a "setTimeout") ?
Note, you can test with "remote-pay-cloud-nodejs-example/lib/ExampleCLI.js".
Sound like https://community.clover.com/questions/23640/how-to-determine-if-connection-failed.html, but finally, not