From f9de56be8d040e28ef18e66d5087a111492301a9 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 6 Mar 2017 22:23:49 +0100 Subject: [PATCH] Fix for multi-threading --- src/mains/bench_psi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mains/bench_psi.cpp b/src/mains/bench_psi.cpp index 97d36b1..e90589b 100644 --- a/src/mains/bench_psi.cpp +++ b/src/mains/bench_psi.cpp @@ -20,7 +20,7 @@ int32_t benchroutine(int32_t argc, char** argv) { string address = "127.0.0.1"; uint16_t port=7766; timeval begin, end; - vector sockfd(ntasks); + vector sockfd; field_type ftype = ECC_FIELD; role_type role = (role_type) 0; uint64_t bytes_sent=0, bytes_received=0, mbfac; @@ -35,6 +35,7 @@ int32_t benchroutine(int32_t argc, char** argv) { &address, &port, &ntasks, &protocol, &nclients, &epsilon, &cardinality, &ftype, &detailed_timings); + sockfd.resize(ntasks); if(role == SERVER) { if(protocol == TTP) { ntasks = nclients;