aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p_stress.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-10-13 14:05:29 -0400
committerDeterminant <[email protected]>2019-10-13 14:05:29 -0400
commit3505e9d33eab6d341185773c1da315b2dc833a21 (patch)
treea67629fea47ee83f5c05d781198469f135882eeb /test/test_p2p_stress.cpp
parent8270af53b2e4741fcacab49a21823597cc31d88c (diff)
WIP: bounded recv buffer
Diffstat (limited to 'test/test_p2p_stress.cpp')
-rw-r--r--test/test_p2p_stress.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_p2p_stress.cpp b/test/test_p2p_stress.cpp
index 9fe1b83..49f1b2e 100644
--- a/test/test_p2p_stress.cpp
+++ b/test/test_p2p_stress.cpp
@@ -179,6 +179,13 @@ void install_proto(AppContext &app, const size_t &seg_buff_size) {
});
}
+void masksigs() {
+ sigset_t mask;
+ sigemptyset(&mask);
+ sigfillset(&mask);
+ pthread_sigmask(SIG_BLOCK, &mask, NULL);
+}
+
int main(int argc, char **argv) {
Config config;
auto opt_no_msg = Config::OptValFlag::create(false);
@@ -225,6 +232,7 @@ int main(int argc, char **argv) {
for (auto &a: apps)
threads.push_back(std::thread([&]() {
+ masksigs();
a.net->listen(a.addr);
for (auto &paddr: addrs)
if (paddr != a.addr) a.net->add_peer(paddr);