aboutsummaryrefslogtreecommitdiff
path: root/connector/external
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-03-04 23:12:25 +0100
committerAlex Auvolat <alex@adnab.me>2020-03-04 23:12:25 +0100
commit8a759683a787bf60404df27e9addcf3849c649de (patch)
tree99bfce0bf21ccf9e2e4a37b8d2e9e6b11614fde3 /connector/external
parent3288cea61c7b7338ac996069be367af71bdbcd0f (diff)
downloadeasybridge-8a759683a787bf60404df27e9addcf3849c649de.tar.gz
easybridge-8a759683a787bf60404df27e9addcf3849c649de.zip
Fix SIGSEGV
Diffstat (limited to 'connector/external')
-rw-r--r--connector/external/external.go6
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")