Skip to content

Bug when setting timeout > 999 seconds #129

@BarthDELUY

Description

@BarthDELUY

Hi,

In phpnats/src/Nats/Connection.php line 180, you use the function "number_format" without the optional parameters.

number_format(3600, 3) outputs "3,600.000", so the timeout is set to 3 seconds instead of 1 hour.

Code should be

number_format($timeout, 3, '.', ''); //http://php.net/manual/en/function.number-format.php
This outputs the desired result: 3600.000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions