Skip to content

Commit

Permalink
fix: close engine server which is important for triggering the idle e…
Browse files Browse the repository at this point in the history
…nclaves remotion process (#1219)

## Description:
close engine server which is important for triggering the idle enclave
remotion process

## Is this change user facing?
YES

## References (if applicable):
there were resource leaks without this fix until the next time the
engine is started (which also removes idle enclave from previous runs)
This close call was included before but it was removed when engine
server service change to engine connect server service
  • Loading branch information
leoporoli committed Sep 4, 2023
1 parent 666f4ee commit 912e855
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engine/server/engine/main.go
Expand Up @@ -183,6 +183,11 @@ func runMain() error {

engineConnectServer := server.NewEngineConnectServerService(serverArgs.ImageVersionTag, enclaveManager, serverArgs.MetricsUserID, serverArgs.DidUserAcceptSendingMetrics, logsDatabaseClient)
apiPath, handler := kurtosis_engine_rpc_api_bindingsconnect.NewEngineServiceHandler(engineConnectServer)
defer func() {
if err := engineConnectServer.Close(); err != nil {
logrus.Errorf("We tried to close the engine connect server service but something fails. Err:\n%v", err)
}
}()

logrus.Info("Running server...")
engineHttpServer := connect_server.NewConnectServer(serverArgs.GrpcListenPortNum, grpcServerStopGracePeriod, handler, apiPath)
Expand Down

0 comments on commit 912e855

Please sign in to comment.