Skip to content

Commit

Permalink
Clearing registration information irrespective of whether or not dere…
Browse files Browse the repository at this point in the history
…gistering works
  • Loading branch information
oxtoacart committed Mar 1, 2015
1 parent 99d43e6 commit 280d9c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/github.com/getlantern/peerscanner/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func (g *group) deregister(h *host) {

log.Debugf("Deregistering from %v: %v", g.subdomain, h)

g.existing = nil
g.isProxying = false

// Destroy the record in the rotation...
err := cfutil.DestroyRecord(g.existing)
if err != nil {
log.Errorf("Unable to deregister host %v from rotation %v: %v", h, g.subdomain, err)
return
}

g.existing = nil
g.isProxying = false
}
6 changes: 3 additions & 3 deletions src/github.com/getlantern/peerscanner/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ func (h *host) deregisterHost() {
}

func (h *host) doDeregisterHost() error {
h.record = nil
h.isProxying = false

err := cfutil.DestroyRecord(h.record)
if err != nil {
return fmt.Errorf("Unable to deregister host %v: %v", h, err)
}

h.record = nil
h.isProxying = false

return nil
}

Expand Down

0 comments on commit 280d9c4

Please sign in to comment.