mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 05:02:31 +00:00
Stuff.
This commit is contained in:
@@ -226,6 +226,7 @@ initialize_command_network() {
|
||||
CMD_VAR_STRING ("network.port_range", "6881-6999");
|
||||
|
||||
CMD_ANY ("network.listen.port", [](auto, auto) { return torrent::runtime::listen_port(); });
|
||||
CMD_ANY_VALUE_V ("network.listen.port.set", [](auto, auto& value) { return torrent::runtime::set_listen_port(); });
|
||||
CMD_ANY ("network.listen.backlog", [nw_config](auto, auto) { return nw_config->listen_backlog(); });
|
||||
CMD_ANY_VALUE_V ("network.listen.backlog.set", [nw_config](auto, auto& value) { return nw_config->set_listen_backlog(value); });
|
||||
|
||||
|
||||
+3
-1
@@ -455,7 +455,9 @@ main(int argc, char** argv) {
|
||||
torrent::net_thread::http_stack()->set_user_agent(USER_AGENT);
|
||||
torrent::runtime::initialize_network();
|
||||
|
||||
control->core()->listen_open();
|
||||
// TODO: Move to initialize_network().
|
||||
if (torrent::runtime::listen_port() == 0)
|
||||
control->core()->listen_open();
|
||||
|
||||
// Load session torrents and perform scheduled tasks to ensure session torrents are loaded
|
||||
// before arg torrents.
|
||||
|
||||
Reference in New Issue
Block a user