Skip to content

Commit

Permalink
Merge pull request #536 from subutai-io/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
crioto authored Jan 12, 2018
2 parents 5276583 + dc4183a commit 9602d85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## [6.2.9] 01/10/2017
## [6.2.9] 01/12/2017

* New option to remove interface from p2p history using `stop` command
* Windows Service implementation with `service` command
Expand Down
4 changes: 4 additions & 0 deletions lib/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ func (p *PeerToPeer) initProxy(addr string) error {
proxy.LastUpdate = time.Now()
proxy.Addr, err = net.ResolveUDPAddr("udp4", addr)
if err != nil {
Log(Error, "Failed to resolve proxy address")
return fmt.Errorf("Failed to resolve proxy address")
}
for _, pr := range p.Proxies {
if pr.Addr.String() == proxy.Addr.String() {
Log(Debug, "Proxy %s already exists", addr)
return fmt.Errorf("Proxy %s already exists", addr)
}
}
Expand All @@ -45,11 +47,13 @@ func (p *PeerToPeer) initProxy(addr string) error {
time.Sleep(100 * time.Millisecond)
if time.Duration(3*time.Second) < time.Since(initStarted) {
p.disableProxy(proxy.Addr)
Log(Error, "Failed to connect to proxy")
return fmt.Errorf("Failed to connect to proxy")
}
}
if proxy.Status != proxyActive {
p.disableProxy(proxy.Addr)
Log(Error, "Wrong proxy status")
return fmt.Errorf("Wrong proxy status")
}
return nil
Expand Down

0 comments on commit 9602d85

Please sign in to comment.