Closed bergwolf closed 7 years ago
I prefer
diff --git a/hyperstart/libhyperstart/serial.go b/hyperstart/libhyperstart/serial.go
index aa0c6cd..d521d6b 100644
--- a/hyperstart/libhyperstart/serial.go
+++ b/hyperstart/libhyperstart/serial.go
@@ -66,11 +66,11 @@ func (h *serialBasedHyperstart) Close() {
for pk := range h.procs {
h.processAsyncEvents <- hyperstartapi.ProcessAsyncEvent{Container: pk.c, Process: pk.p, Event: "finished", Status: 255}
}
- h.procs = nil
+ h.procs = make(map[pKey]*pState)
for _, out := range h.streamOuts {
out.Close()
}
- h.streamOuts = nil
+ h.streamOuts = make(map[uint64]streamOut)
close(h.ctlChan)
close(h.streamChan)
close(h.processAsyncEvents)
@laijs updated.
Fixes panic: