feat: increase agent boot timeout from 30s to 60s
This commit is contained in:
@@ -47,7 +47,7 @@ func NewClient(host string, port int, log *logger.Logger) *Client {
|
||||
return &Client{
|
||||
baseURL: fmt.Sprintf("http://%s:%d", host, port),
|
||||
httpClient: &http.Client{
|
||||
Timeout: 30 * time.Second,
|
||||
Timeout: 60 * time.Second,
|
||||
},
|
||||
logger: log.WithFields(zap.String("component", "agentctl-client")),
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ func (a *Adapter) Initialize(ctx context.Context) error {
|
||||
|
||||
// Send initialize control request to get slash commands
|
||||
// This is required for streaming mode (input-format=stream-json)
|
||||
initResp, err := a.client.Initialize(ctx, 30*time.Second)
|
||||
initResp, err := a.client.Initialize(ctx, 60*time.Second)
|
||||
if err != nil {
|
||||
a.logger.Warn("failed to initialize (continuing anyway)", zap.Error(err))
|
||||
} else if initResp != nil && len(initResp.Commands) > 0 {
|
||||
|
||||
@@ -46,7 +46,7 @@ func (s *Server) handleAgentInitialize(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(c.Request.Context(), 30*time.Second)
|
||||
ctx, cancel := context.WithTimeout(c.Request.Context(), 60*time.Second)
|
||||
defer cancel()
|
||||
|
||||
adapter := s.procMgr.GetAdapter()
|
||||
|
||||
Reference in New Issue
Block a user