Skip to content

Commit

Permalink
Boss/Mod/: Do not delay response to init.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZmnSCPxj committed Nov 10, 2020
1 parent dccbbc9 commit fc751c8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Boss/Mod/ChannelCandidateInvestigator/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include"Boss/Msg/SolicitChannelCandidates.hpp"
#include"Boss/Msg/SolicitStatus.hpp"
#include"Boss/Msg/TimerRandomHourly.hpp"
#include"Boss/concurrent.hpp"
#include"Boss/log.hpp"
#include"Boss/random_engine.hpp"
#include"Ev/map.hpp"
Expand Down Expand Up @@ -72,7 +73,9 @@ void Manager::start() {
tx.commit();

if (good_candidates < min_good_candidates)
return solicit_candidates(good_candidates);
return Boss::concurrent(
solicit_candidates(good_candidates)
);

return Ev::lift();
});
Expand Down
8 changes: 6 additions & 2 deletions Boss/Mod/ConnectFinderByDns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include"Boss/Msg/ProposeConnectCandidates.hpp"
#include"Boss/Msg/Network.hpp"
#include"Boss/Msg/SolicitConnectCandidates.hpp"
#include"Boss/concurrent.hpp"
#include"Boss/log.hpp"
#include"Boss/random_engine.hpp"
#include"DnsSeed/get.hpp"
Expand Down Expand Up @@ -140,13 +141,16 @@ class ConnectFinderByDns::Impl {
});
});
};
return Ev::map(std::move(f), it->second
).then([this](DnsSeeds n_seeds) {
auto code = Ev::map(std::move(f), it->second
).then([this
](DnsSeeds n_seeds
) {
dnsseeds = Util::make_unique<DnsSeeds>(
std::move(n_seeds)
);
return check_dnsseeds();
});
return Boss::concurrent(std::move(code));
}
return Boss::log( bus, Warn
, "DnsSeed: Cannot seed by DNS: %s"
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.5B
- Do not delay response to `init`.

0.5A
- Handle `rpc_command` specially for better RPC response times even when CLBOSS is busy.
- Make compilable on FreeBSD.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([clboss], [0.5A], [[email protected]])
AC_INIT([clboss], [0.5B], [[email protected]])
AC_CONFIG_AUX_DIR([auxdir])
AM_INIT_AUTOMAKE([subdir-objects tar-ustar])
AC_CONFIG_SRCDIR([main.cpp])
Expand Down

0 comments on commit fc751c8

Please sign in to comment.