Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of reverse tunnel agent #365

Merged
merged 1 commit into from
Apr 17, 2016
Merged

Refactoring of reverse tunnel agent #365

merged 1 commit into from
Apr 17, 2016

Conversation

kontsevoy
Copy link
Contributor

  • reduced number of goroutines
  • reduced number of 'sleep constants', settling on just one:
    defaults.HeartbeatPeriod
  • increased the interval

Fixes #358

conn, err := a.connect()
// start heartbeat even if error happend, it will reconnect
go a.runHeartbeat(conn)
return err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trace.Wrap

@kontsevoy
Copy link
Contributor Author

I've added a couple of missed trace.Wrap() calls. Other suggestions make the logic hard to follow. Right now runHeartbeat() incapsulates 100% of Agent lifecycle bookkeeping in a neat local context, so you can see without jumping around what can happen to it.

- reduced number of goroutines
- reduced number of 'sleep constants', settling on just one:
  `defaults.HeartbeatPeriod`
- increased the interval

Fixes #358
@klizhentas klizhentas merged commit 48d35b2 into master Apr 17, 2016
@klizhentas klizhentas deleted the ev/tk branch April 17, 2016 22:51
@ryanclark ryanclark mentioned this pull request Jul 28, 2022
hatched pushed a commit to hatched/teleport-merge that referenced this pull request Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants