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
In GetNameVersion() code looks like this:
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