Require port in ips_fixed (RIPD-892)

This commit is contained in:
Miguel Portilla
2015-05-20 13:13:15 -04:00
parent ea4161d880
commit d90ba775e8
2 changed files with 8 additions and 2 deletions

View File

@@ -211,6 +211,12 @@ public:
for (auto const& remote_address : addresses)
{
if (remote_address.port () == 0)
{
throw std::runtime_error ("Port not specified for address:" +
remote_address.to_string ());
}
auto result (state->fixed.emplace (std::piecewise_construct,
std::forward_as_tuple (remote_address),
std::make_tuple (std::ref (m_clock))));