Skip to content

Commit

Permalink
Break the bindToSocket retry loop on success
Browse files Browse the repository at this point in the history
This caused all invocations to print a stack trace indicating a serious
sounding error when in fact everything was working fine.  Added a log
statement to clarify that everything is fine :)

Closes facebookarchive#49
  • Loading branch information
Josh Guilfoyle committed Feb 20, 2015
1 parent 54f2ad9 commit 4368b63
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -276,6 +276,8 @@ private void bindToSocket(String address) {
LogUtil.d("Binding server to " + address);
}
mServerSocket = new LocalServerSocket(address);
LogUtil.i("Listening on @" + address);
return;
} catch (BindException be) {
LogUtil.w(be, "Binding error, sleep 1 second ...");
if (retries == 0)
Expand Down

0 comments on commit 4368b63

Please sign in to comment.