-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add connection retry with MaxConnectionAttempts (#16)
The application using this library hangs (never exits) if the SSH tunnel is being used by a lots of goroutines and an error occurs in the forward() method when a connection is being made. Connection attempts seem to intermittently fail, and this somehow leads to the code never exiting when complete. I found that the connection attempt would succeed after 1 or 2 retries, then the application would later exit like normal. This PR adds a optional retry mechanism. It must be enabled with MaxConnectionAttempts. Fixed #15
- Loading branch information
1 parent
6539d4e
commit 27700fc
Showing
1 changed file
with
38 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters