Skip to content

Commit 93600fc

Browse files
committed
Bumped v0.5.8
Signed-off-by: Vishal Rana <[email protected]>
1 parent a20f9ce commit 93600fc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
IMAGE = labstack/tunnel
2-
VERSION = 0.5.7
2+
VERSION = 0.5.8
33

44
publish:
55
git tag v$(VERSION)

daemon/connection.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type (
3737

3838
Connection struct {
3939
server *Server
40-
startChan chan bool
40+
startChan chan error
4141
acceptChan chan net.Conn
4242
reconnectChan chan error
4343
stopChan chan bool
@@ -87,7 +87,7 @@ func (s *Server) newConnection(req *ConnectRequest) (c *Connection, err error) {
8787
id, _ := gonanoid.Nanoid()
8888
c = &Connection{
8989
server: s,
90-
startChan: make(chan bool),
90+
startChan: make(chan error),
9191
acceptChan: make(chan net.Conn),
9292
reconnectChan: make(chan error),
9393
stopChan: make(chan bool),
@@ -206,7 +206,7 @@ RECONNECT:
206206
c.retries = 0
207207
if !c.started {
208208
c.started = true
209-
c.startChan <- true
209+
c.startChan <- c.server.findConnection(c)
210210
}
211211
log.Infof("connection %s is online", c.Name)
212212

daemon/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ func (s *Server) Connect(req *ConnectRequest, rep *ConnectReply) (err error) {
6060
return
6161
}
6262
go c.connect()
63-
<-c.startChan
64-
return s.findConnection(c)
63+
return <-c.startChan
6564
}
6665

6766
func (s *Server) PS(req *PSRequest, rep *PSReply) (err error) {
@@ -100,6 +99,7 @@ func Start() {
10099
go func() {
101100
<-c
102101
log.Warn("stopping daemon")
102+
os.Exit(0)
103103
}()
104104

105105
// Listen

0 commit comments

Comments
 (0)