Add heartbeat / automatic server cleanup code
This replaces the previous method of attempting to clean up servers when an unexpected exit occurs in the client (e.g. SIGINT or panic) by a heartbeat protocol. If the server does not hear from the connecting client within a certain interval of time (500ms in this commit), it will de-activate itself. This prevents dangling Docker Machine server processes from accumulating. Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
@@ -106,7 +106,7 @@ func TestExecServer(t *testing.T) {
|
||||
stopCh: make(chan bool, 1),
|
||||
}
|
||||
|
||||
finalErr := make(chan error, 1)
|
||||
finalErr := make(chan error)
|
||||
|
||||
// Start the docker-machine-foo plugin server
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user