koding / tunnel

Tunnel proxy package in Go
BSD 3-Clause "New" or "Revised" License
314 stars 70 forks source link

Adds possibility to change backoff policy when constructing client. #18

Closed mmatczuk closed 8 years ago

rjeczalik commented 8 years ago

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 own tunnel.Backoff value with tunnel.ClientConfig. For details see inline doc here.

Sorry for taking over the feature! :innocent: :innocent: :innocent:

mmatczuk commented 8 years ago

Ok I'll adjust to new API.