diff --git a/src/.main.c.swp b/src/.main.c.swp new file mode 100644 index 0000000..b30b8a7 Binary files /dev/null and b/src/.main.c.swp differ diff --git a/src/main.c b/src/main.c index a3ef6e5..a197af9 100644 --- a/src/main.c +++ b/src/main.c @@ -167,7 +167,7 @@ void my_sleep(int microseconds) { // Compact threshold: if a client has more than this many messages in a single // outgoing buffer that all arrived within COMPACT_WINDOW_US, pack them into // a single CompactedMessage frame to reduce ws_sendframe_bin syscall overhead. -#define COMPACT_THRESHOLD 4 +#define COMPACT_THRESHOLD 10 #define COMPACT_WINDOW_US 100000ULL // 100 ms static void compact_outgoing_buffer(SizedPtr* buf) @@ -570,7 +570,7 @@ int main(int argc, char** argv) } - if (clients_try_timer == 0) + if (clients_try_timer == 0 || emulState != EMUL_STATE_EXEC) { if(getCurrentUsec() - lastTickCountWindowAt > 1000000) diff --git a/src/proto/handlers/config.c b/src/proto/handlers/config.c index ae2267a..3d1121d 100644 --- a/src/proto/handlers/config.c +++ b/src/proto/handlers/config.c @@ -601,6 +601,7 @@ void handleConfigCtrlMessage( return; } + printf("[CTRL/CONFIG] loaded %zu devices\n", st.count); // Apply projections @@ -733,6 +734,7 @@ void handleConfigCtrlMessage( st.seg_names[i][j] = strdup(handl->ctx->deviceMem->memsegNames[j]); } } + *emulContext->resetRequest = 1; uint8_t* out = fb_build_config_device_id_mapping( nonce, st.paths, st.path_lens, st.seg_names, st.seg_counts, dc, &msg_len);