]> git.bitcoin.ninja Git - tunudptotcp/commitdiff
Sleep slightly longer when polling
authorMatt Corallo <git@bluematt.me>
Wed, 16 Mar 2022 18:49:21 +0000 (18:49 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 16 Mar 2022 21:20:38 +0000 (21:20 +0000)
main.cpp

index c5e73e2477a55cdad7c5600e67d8a019f426ec50..e070706ae7546eb945f95543592e271c00245c08 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -314,7 +314,7 @@ static uint64_t tcp_init_magic;
 #define PENDING_MESSAGES_BUFF_SIZE (0x3000)
 #define PACKET_READ_OFFS (20-16)
 #define PACKET_READ_SIZE (1500 - PACKET_READ_OFFS)
-#define THREAD_POLL_SLEEP_MICS 50
+#define THREAD_POLL_SLEEP_MICS 250
 struct MessageQueue {
        std::tuple<sockaddr_in, std::array<unsigned char, PACKET_READ_SIZE + PACKET_READ_OFFS>, ssize_t> messagesPendingRingBuff[PENDING_MESSAGES_BUFF_SIZE];
        std::atomic<uint16_t> nextPendingMessage, nextUndefinedMessage;