change move dnet_load_keys for only full nodes.
@@ -595,6 +595,8 @@ int dnet_init(int argc, char **argv) {
else if (!strcmp(argv[i], "-t") && i + 1 < argc) sscanf(argv[++i], "%u", &nthreads);
}
+ if (nthreads >= 1) {
+
#if defined(_WIN32) || defined(_WIN64) || defined (__MACOS__) || defined (__APPLE__)
if((err = dnet_load_keys())) {
printf("Load dnet keys failed.");
@@ -602,7 +604,6 @@ int dnet_init(int argc, char **argv) {
}
#endif
- if (nthreads >= 1) {
g_nthreads = nthreads;
g_threads = calloc(sizeof(struct xthread), nthreads);
g_connections = calloc(sizeof(struct xconnection), nthreads * MAX_CONNECTIONS_PER_THREAD);
