Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
68e0032f
Commit
68e0032f
authored
Jun 22, 2016
by
Adam Reese
Committed by
GitHub
Jun 22, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #863 from adamreese/fix/686-tunnel-error
fix(tunnel): display friendly error on connect issues
parents
51b6bca9
d300a089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
tunnel.go
pkg/kube/tunnel.go
+8
-7
No files found.
pkg/kube/tunnel.go
View file @
68e0032f
...
...
@@ -66,16 +66,17 @@ func (c *Client) ForwardPort(namespace, podName string, remote int) (*Tunnel, er
return
nil
,
err
}
errChan
:=
make
(
chan
error
)
go
func
()
{
if
err
:=
pf
.
ForwardPorts
();
err
!=
nil
{
fmt
.
Printf
(
"Error forwarding ports: %v
\n
"
,
err
)
}
errChan
<-
pf
.
ForwardPorts
()
}()
// wait for listeners to start
<-
pf
.
Ready
return
t
,
nil
select
{
case
err
=
<-
errChan
:
return
t
,
fmt
.
Errorf
(
"Error forwarding ports: %v
\n
"
,
err
)
case
<-
pf
.
Ready
:
return
t
,
nil
}
}
func
getAvailablePort
()
(
int
,
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment