Skip to content

Commit

Permalink
Merge pull request getlantern#2841 from getlantern/issue-2840
Browse files Browse the repository at this point in the history
Stopping Lantern when port 8787 is not available. Closes #2840
  • Loading branch information
myleshorton committed Jul 29, 2015
2 parents b1d6ba6 + c0a06d1 commit 1cee1a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/github.com/getlantern/flashlight/flashlight.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ func runClientProxy(cfg *config.Config) {
watchDirectAddrs()

go func() {
addExitFunc(pacOff)
err := client.ListenAndServe(func() {
pacOn()
addExitFunc(pacOff)
if showui && !*startup {
// Launch a browser window with Lantern but only after the pac
// URL and the proxy server are all up and running to avoid
Expand All @@ -267,7 +267,7 @@ func runClientProxy(cfg *config.Config) {
}
})
if err != nil {
log.Errorf("Error calling listen and serve: %v", err)
exit(fmt.Errorf("Error calling listen and serve: %v", err))
}
}()
}
Expand Down

0 comments on commit 1cee1a4

Please sign in to comment.