Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cli/azd/cmd/middleware/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,9 @@ func getReadyContext(ctx context.Context) (context.Context, context.CancelFunc)
return context.WithCancel(ctx)
}

// Use custom timeout from environment variable or default to 5 seconds
timeout := 5 * time.Second
// Use custom timeout from environment variable or default to 15 seconds.
// 15s accommodates Windows cold-start overhead (Defender scanning, process creation).
timeout := 15 * time.Second
Comment thread
spboyer marked this conversation as resolved.
if timeoutValue := os.Getenv("AZD_EXT_TIMEOUT"); timeoutValue != "" {
if seconds, err := strconv.Atoi(timeoutValue); err == nil && seconds > 0 {
timeout = time.Duration(seconds) * time.Second
Expand Down
4 changes: 2 additions & 2 deletions cli/azd/internal/grpcserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (s *Server) Start() (*ServerInfo, error) {
azdext.RegisterAiModelServiceServer(s.grpcServer, s.aiModelService)
azdext.RegisterCopilotServiceServer(s.grpcServer, s.copilotService)

serverInfo.Address = fmt.Sprintf("localhost:%d", randomPort)
serverInfo.Address = fmt.Sprintf("127.0.0.1:%d", randomPort)
serverInfo.Port = randomPort
serverInfo.SigningKey = signingKey

Expand All @@ -141,7 +141,7 @@ func (s *Server) Start() (*ServerInfo, error) {
log.Printf("azd gRPC Server listening on port %d", randomPort)

return &ServerInfo{
Address: fmt.Sprintf("localhost:%d", randomPort),
Address: fmt.Sprintf("127.0.0.1:%d", randomPort),
Port: randomPort,
Comment thread
spboyer marked this conversation as resolved.
Outdated
SigningKey: signingKey,
}, nil
Expand Down
Loading