Skip to content

Commit 3ff29ed

Browse files
committed
Merge remote-tracking branch 'origin/pr/118'
2 parents b000873 + c9b94f9 commit 3ff29ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

machine.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,10 +723,14 @@ func (m *Machine) refreshMachineConfiguration() error {
723723
// waitForSocket waits for the given file to exist
724724
func (m *Machine) waitForSocket(timeout time.Duration, exitchan chan error) error {
725725
ctx, cancel := context.WithTimeout(context.Background(), timeout)
726-
defer cancel()
727726

728727
ticker := time.NewTicker(10 * time.Millisecond)
729728

729+
defer func() {
730+
cancel()
731+
ticker.Stop()
732+
}()
733+
730734
for {
731735
select {
732736
case <-ctx.Done():

0 commit comments

Comments
 (0)