kopia lustrzana https://github.com/cyoung/stratux
updated shutdown to use a separate thread to kill dump1090
rodzic
dea3374242
commit
cf94e0c79f
10
main/sdr.go
10
main/sdr.go
|
@ -88,6 +88,16 @@ func (e *ES) read() {
|
||||||
log.Println("\t kill successful...")
|
log.Println("\t kill successful...")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
default:
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-done:
|
||||||
|
return
|
||||||
default:
|
default:
|
||||||
if scanStdout.Scan() {
|
if scanStdout.Scan() {
|
||||||
replayLog(scanStdout.Text(), MSGCLASS_DUMP1090)
|
replayLog(scanStdout.Text(), MSGCLASS_DUMP1090)
|
||||||
|
|
Ładowanie…
Reference in New Issue