Skip to content

Conversation

@karlseguin
Copy link
Collaborator

No description provided.

src/main.zig Outdated

server.run(address, opts.timeout * 1000) catch |err| {
// max timeout of 1 week.
const timeout = if (opts.timeout > 604_800) 604_800_000 else @as(i32, @intCast(opts.timeout)) * 1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should to either:

  • add in the help the indication we take a max of 1 week timeout
  • error the command if the value is bigger than 1 week.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't @as(i32, opts.timeout) enough? why do we need @intCast?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expanded on the --help text. I removed the @intcast

@karlseguin karlseguin merged commit d81377b into main Sep 4, 2025
10 checks passed
@karlseguin karlseguin deleted the timeout_limit branch September 4, 2025 08:02
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants