Skip to content

Commit 22d7cca

Browse files
committed
orchestrator proxy service shutdown without timeout specified
1 parent 64ae46c commit 22d7cca

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/orchestrator/main.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ import (
55
"errors"
66
"flag"
77
"fmt"
8+
"go.uber.org/zap"
9+
"go.uber.org/zap/zapcore"
810
"log"
911
"os"
1012
"os/signal"
1113
"sync"
1214
"sync/atomic"
1315
"syscall"
14-
"time"
15-
16-
"go.uber.org/zap"
17-
"go.uber.org/zap/zapcore"
1816

1917
"github.com/e2b-dev/infra/packages/orchestrator/internal/consul"
2018
"github.com/e2b-dev/infra/packages/orchestrator/internal/proxy"
@@ -174,10 +172,8 @@ func main() {
174172
}
175173
}
176174

177-
// close session proxy, wait 5 seconds until all connections are closed
178-
shutdownCtx, shutdownCtxCancel := context.WithTimeout(context.Background(), 5*time.Second)
179-
defer shutdownCtxCancel()
180-
defer sessionProxy.Shutdown(shutdownCtx)
175+
// close sandbox proxy, this will wait until all sessions are closed
176+
defer sessionProxy.Shutdown(context.Background())
181177
}()
182178

183179
wg.Wait()

0 commit comments

Comments
 (0)