Fix SIGSEGV

This commit is contained in:
Alex 2020-03-04 23:12:25 +01:00
parent 3288cea61c
commit 8a759683a7
1 changed files with 4 additions and 2 deletions

View File

@ -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")