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
d300a089
Commit
d300a089
authored
Jun 21, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tunnel): display friendly error on connect issues
Fixes: #686
parent
0acbcdd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
tunnel.go
pkg/kube/tunnel.go
+7
-6
No files found.
pkg/kube/tunnel.go
View file @
d300a089
...
...
@@ -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
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