diff seobeo/os/s_macos_edge.c @ 260:1f9877b637e9

Add Copilot-powered cyberpunk JRPG chat Integrate the production JRPG chat with Seobeo streaming, Deita persistence, and a Bazel-managed Copilot SDK and LiteLLM inference stack. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <mrjunejune@users.noreply.github.com>
date Wed, 05 Aug 2026 09:19:41 -0700
parents 609d3c6aff4e
children
line wrap: on
line diff
--- a/seobeo/os/s_macos_edge.c	Wed Aug 05 09:19:41 2026 -0700
+++ b/seobeo/os/s_macos_edge.c	Wed Aug 05 09:19:41 2026 -0700
@@ -23,9 +23,12 @@
   };
   kevent(kq, &kev, 1, NULL, 0, NULL);
 
-  while (1)
+  while (!Seobeo_Web_Server_Is_Stopping())
   {
-    int ne = kevent(kq, NULL, 0, evlist, 64, NULL);
+    struct timespec timeout = {
+      .tv_nsec = 250 * 1000 * 1000,
+    };
+    int ne = kevent(kq, NULL, 0, evlist, 64, &timeout);
     if (ne < 0) {
       if (errno == EINTR) continue;
       perror("kevent");