File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -226,19 +226,18 @@ func stopNetwork(config *networks.YAML, name string) error {
226
226
return err
227
227
}
228
228
}
229
- // wait for VMNet to terminate (up to 5s) before stopping Switch, otherwise the socket may not get deleted
230
- if daemon == networks .VDEVMNet {
231
- startWaiting := time .Now ()
232
- for {
233
- if pid , _ := store .ReadPIDFile (config .PIDFile (name , daemon )); pid == 0 {
234
- break
235
- }
236
- if time .Since (startWaiting ) > 5 * time .Second {
237
- logrus .Infof ("%q daemon for %q network still running after 5 seconds" , daemon , name )
238
- break
239
- }
240
- time .Sleep (500 * time .Millisecond )
229
+ // wait for daemons to terminate (up to 5s) before stopping, otherwise the sockets may not get deleted which
230
+ // will cause subsequent start commands to fail.
231
+ startWaiting := time .Now ()
232
+ for {
233
+ if pid , _ := store .ReadPIDFile (config .PIDFile (name , daemon )); pid == 0 {
234
+ break
241
235
}
236
+ if time .Since (startWaiting ) > 5 * time .Second {
237
+ logrus .Infof ("%q daemon for %q network still running after 5 seconds" , daemon , name )
238
+ break
239
+ }
240
+ time .Sleep (500 * time .Millisecond )
242
241
}
243
242
}
244
243
return nil
You can’t perform that action at this time.
0 commit comments