There are two problems with this PR - we shouldn't reference external types in our API and second when Next...() returns -1 the Start loop should be closed and ClientClosed event emitted.
I needed to fix race with access to (*tunnel.Client).redialBackoff field in #19 so I took the opportunity and made the field configurable, so you pass your own tunnel.Backoff value with tunnel.ClientConfig. For details see inline doc here.
Sorry for taking over the feature! :innocent: :innocent: :innocent:
Hey @mmatczuk!
Thanks for your contribution.
There are two problems with this PR - we shouldn't reference external types in our API and second when
Next...()
returns -1 the Start loop should be closed and ClientClosed event emitted.I needed to fix race with access to
(*tunnel.Client).redialBackoff
field in #19 so I took the opportunity and made the field configurable, so you pass your owntunnel.Backoff
value withtunnel.ClientConfig
. For details see inline doc here.Sorry for taking over the feature! :innocent: :innocent: :innocent: