Frun1na opened a new issue, #4628:
URL: https://github.com/apache/rocketmq-dashboard/issues/4628

   ### Bug Description
   
   When `rmqctl` is run with `--timeout 0s` (or any negative duration), every 
command fails immediately with a context error instead of running:
   
   ```
   $ rmqctl --server http://localhost:8080 --instance-id instance-dev --timeout 
0s topic list
   Error: Post "http://localhost:8080/api/mcp/tools/call": context deadline 
exceeded
   ```
   
   The server is never contacted — the request fails before it is sent.
   
   ### Steps to Reproduce
   
   1. Start a healthy dashboard server with an accessible instance.
   2. Run any read-only command with `--timeout 0s`, e.g. `rmqctl --server ... 
--instance-id ... --timeout 0s topic list`.
   3. The command fails with `context deadline exceeded` even though the server 
responds instantly.
   
   ### Expected Behavior
   
   A non-positive timeout should mean "no client-side timeout" (the common 
convention for timeout flags), so the command should succeed.
   
   ### Actual Behavior
   
   `rmqctl/internal/studio/client.go` passes `target.Timeout` unconditionally 
to `context.WithTimeout`, and a non-positive duration expires the context 
immediately, so every request fails before being sent.
   
   ### Environment
   
   - rmqctl built from `rocketmq-studio` branch
   - Linux x86_64
   - Go 1.27
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to