0
0
mirror of https://github.com/cjdelisle/cjdns synced 2025-10-06 00:32:50 +02:00

Fix crash bug on single processor VMs

This commit is contained in:
Caleb James DeLisle
2024-10-24 13:43:34 +00:00
parent 5553a40e4d
commit bd0ba81336
2 changed files with 3 additions and 3 deletions

View File

@@ -262,7 +262,7 @@ static int genconf(struct Allocator* alloc, struct Random* rand, bool eth, bool
" \"seed.cjdns.fr\"\n"
" ],\n"
"\n"
" // If publicPeer is set, this node will post its public peering credentials\n"
" // When publicPeer is set, this node will post its public peering credentials\n"
" // to its supernode. The specified peerID will be used to identify itself.\n"
" // For PKT yielding this must be set to the registered peerID, otherwise\n"
" // you can set it to anything. By *convention*, peerIDs that begin with \"PUB_\"\n"
@@ -270,7 +270,7 @@ static int genconf(struct Allocator* alloc, struct Random* rand, bool eth, bool
" // shared, allowing you to use the snode's peer tester on an otherwise private\n"
" // node.\n"
" //\n"
" // \"publicPeer\": \"PUB_XXX\","
" // \"publicPeer\": \"PUB_XXX\",\n"
"\n"
" // supernodes, if none are specified they'll be taken from your peers\n"
" \"supernodes\": [\n"

View File

@@ -661,7 +661,7 @@ impl SocketIface {
// In this scenario, half the core count will be receiving and the other half will be
// sending.
let workers = match num_cpus::get() / 2 {
n if n < fds.len() => fds.len(),
n if n < afds.len() => afds.len(),
n => n,
};