Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Instance: fix failed conversion when supplying port
Browse files Browse the repository at this point in the history
Fixes boost::bad_any_cast when supplying port
  • Loading branch information
anonimal committed Apr 20, 2017
1 parent ce7719a commit f3afc75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void Instance::InitRouterContext() {
// Random generated port if none is supplied via CLI or config
// See: i2p.i2p/router/java/src/net/i2p/router/transport/udp/UDPEndpoint.java
auto port = map["port"].defaulted() ? kovri::core::RandInRange32(9111, 30777)
: map["port"].as<std::uint16_t>();
: map["port"].as<int>();
// TODO(unassigned): context should be in core namespace (see TODO in router context)
context.Init(host, port);
context.UpdatePort(port);
Expand Down

0 comments on commit f3afc75

Please sign in to comment.