diff options
author | Alex Auvolat <alex@adnab.me> | 2020-03-04 23:12:25 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-03-04 23:12:25 +0100 |
commit | 8a759683a787bf60404df27e9addcf3849c649de (patch) | |
tree | 99bfce0bf21ccf9e2e4a37b8d2e9e6b11614fde3 | |
parent | 3288cea61c7b7338ac996069be367af71bdbcd0f (diff) | |
download | easybridge-8a759683a787bf60404df27e9addcf3849c649de.tar.gz easybridge-8a759683a787bf60404df27e9addcf3849c649de.zip |
Fix SIGSEGV
-rw-r--r-- | connector/external/external.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/connector/external/external.go b/connector/external/external.go index d4a6caf..637e69e 100644 --- a/connector/external/external.go +++ b/connector/external/external.go @@ -333,8 +333,10 @@ func (ext *External) Close() { go func() { time.Sleep(1 * time.Second) - log.Info("Sending SIGKILL to external process (did not terminate within 1 second)") - ext.proc.Process.Kill() + if ext.proc != nil { + log.Info("Sending SIGKILL to external process (did not terminate within 1 second)") + ext.proc.Process.Kill() + } }() ext.proc.Wait() log.Info("External process exited") |