Open sk87287 opened 11 years ago
Thanks for reporting it. You are right, it has never happened to me but it's a potential error. I'm fixing it using your suggestion.
Awesome! Thanks!
I'm working with several processes with adb connections and using adbclient. Method call self.socket.recv(4)
from adbclient.py not wrapped by try-finally section and terminate process after timeout without any messages and exceptions. Also, process anyway terminates when timeout expired. Perhaps it would be not bad idea to remove self.setAlarm
method which still ingored on Windows.
I've experienced the exact same issue and I had the alarm disabled. Furthermore you can't implement the signal alarm when wrapping it with multiple threads.
Shawn
在 2015年9月7日,14:18,Vladimir Surjaninov notifications@github.com 写道:
I'm working with several processes with adb connections and using adbclient. Method call self.socket.recv(4) from adbclient.py not wrapped by try-finally section and terminate process after timeout without any messages and exceptions. Also, process anyway terminates when timeout expired. Perhaps it would be not bad idea to remove self.setAlarm method which still ingored on Windows.
— Reply to this email directly or view it on GitHub.
In checkOk of adbclient.py, on line 174 a RuntimeError is raised but the timer is not cancelled. One way to resolve this is to wrap the entire thing in a try-finally putting self.setAlarm(0) in the finally instead of directly after the RuntimeError. Thoughts?