(remote, kill)
| 108 | # Spin up a thread to keep the remote server connection alive while we make a capture, |
| 109 | # as it will time out after 5 seconds of inactivity |
| 110 | def ping_remote(remote, kill): |
| 111 | success = True |
| 112 | while success and not kill.is_set(): |
| 113 | success = remote.Ping() |
| 114 | time.sleep(1) |
| 115 | |
| 116 | kill = threading.Event() |
| 117 | ping_thread = threading.Thread(target=ping_remote, args=(remote,kill)) |