diff --git a/smemory.h b/smemory.h index 09c05f47..15afd971 100644 --- a/smemory.h +++ b/smemory.h @@ -1,5 +1,5 @@ #define QUEUE_SIZE 64 -#define PACKET_SIZE 512 * 1024 +#define PACKET_SIZE 5 * 1024 * 1024 typedef struct { int active; diff --git a/src/main.cpp b/src/main.cpp index 16c542ec..818d4583 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -309,7 +309,9 @@ main(int argc, char *argv[]) { auto touch_port = mail->event(mail::touch_port); while (!process_shutdown_event->peek() && !local_shutdown->peek()) { - if(touch_port->peek()) { + if(!touch_port->peek()) { + std::this_thread::sleep_for(100ms); + } else { auto touch = touch_port->pop(); if (touch.has_value()) { auto value = touch.value();