Skip to content

GetNameVersion() overrides read timeout set by caller #22

@mchack-work

Description

@mchack-work

In GetNameVersion() code looks like this:

tk.SetReadTimeoutNoErr(2)
defer tk.SetReadTimeoutNoErr(0)

which is problematic since it overrides any timeout the caller might have set themselves with a call to SetReadTimeoutNoErr to the default 0 (wait forever). Even if we want to have a timeout of 2 seconds for GetNameVersion() we should at least set it back to what it was before, not 0.

Here https://github.com/tillitis/tkeyclient/blob/main/tkeyclient.go#L180

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions