Closed coolparadox closed 7 years ago
As a side note, I could not find a quick solution for testing the timeout parameter. Should we open an issue for investigating a way of testing the library with delayed network access?
Yes make an issue for for it. We can circle back to it when figuring out http timing tests for CNC
func NewHandler(timeoutMS int64) (Handler, error)
Whenever accepting such input, please use type time.Duration
. That way user can express it however they want instead of being forced to think in milliseconds.
Created #12 for testing timeouts
@sajal Back using time.Duration in NewHandler().
Moreover, when a value zero is passed as timeout, it now means "no timeout", as it's the default behaviour for http.Client and dns.Client.
@sajal The timeout branch was created on top of _static_iptest branch, so there are common commits at the beginning.
Fixes #5