mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Fixed std exception in ip port parse int.
This commit is contained in:
11
src/conf.hpp
11
src/conf.hpp
@@ -36,9 +36,16 @@ namespace conf
|
||||
if (host_address.empty())
|
||||
return -1;
|
||||
|
||||
port = std::stoi(split.back());
|
||||
if (port == 0)
|
||||
try
|
||||
{
|
||||
port = std::stoi(split.back());
|
||||
if (port == 0)
|
||||
return -1;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user