mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
Allow binding to the any address, and report failure
This commit is contained in:
parent
0f1707de67
commit
55bb0cfbb6
1 changed files with 3 additions and 3 deletions
|
@ -611,8 +611,8 @@ bool AppInit2()
|
|||
std::string strError;
|
||||
if (mapArgs.count("-bind")) {
|
||||
BOOST_FOREACH(std::string strBind, mapMultiArgs["-bind"]) {
|
||||
CService addrBind(strBind, GetListenPort(), false);
|
||||
if (!addrBind.IsValid())
|
||||
CService addrBind;
|
||||
if (!Lookup(strBind.c_str(), addrBind, GetListenPort(), false))
|
||||
return InitError(strprintf(_("Cannot resolve -bind address: '%s'"), strBind.c_str()));
|
||||
fBound |= Bind(addrBind);
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ bool AppInit2()
|
|||
#endif
|
||||
}
|
||||
if (!fBound)
|
||||
return false;
|
||||
return InitError(_("Not listening on any port"));
|
||||
}
|
||||
|
||||
if (mapArgs.count("-externalip"))
|
||||
|
|
Loading…
Reference in a new issue