Skip to content

Commit 249f715

Browse files
JiahuiJianggatesn
authored andcommitted
Fix parent process watcher thread (#416)
* Fix parent process watcher thread * timer
1 parent a30b5bc commit 249f715

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyls/python_ls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ def watch_parent_process(pid):
163163
log.info("parent process %s is not alive", pid)
164164
self.m_exit()
165165
log.debug("parent process %s is still alive", pid)
166-
threading.Timer(PARENT_PROCESS_WATCH_INTERVAL, watch_parent_process(pid)).start()
166+
threading.Timer(PARENT_PROCESS_WATCH_INTERVAL, watch_parent_process, args=[pid]).start()
167167

168-
watching_thread = threading.Thread(target=watch_parent_process, args=[processId])
168+
watching_thread = threading.Thread(target=watch_parent_process, args=(processId,))
169169
watching_thread.daemon = True
170170
watching_thread.start()
171171

0 commit comments

Comments
 (0)