diff seobeo/s_web.c @ 33:c0f6c8c7829f

[Seobeo] Linux epoll. Set the client socket to be nonblocking so that it doesn't stop loading when two different threads handle different client calls. I might have problem with socket not being cleaned up properly so need to check that.
author MrJuneJune <me@mrjunejune.com>
date Fri, 10 Oct 2025 06:59:32 -0700
parents 947b81010aba
children 6c322f9c2cb9
line wrap: on
line diff
--- a/seobeo/s_web.c	Thu Oct 09 07:03:36 2025 -0700
+++ b/seobeo/s_web.c	Fri Oct 10 06:59:32 2025 -0700
@@ -202,6 +202,7 @@
                         (const uint8*)entry->buffer,
                         (uint32)body_size);
     Seobeo_Handle_Flush(p_cli_handle);
+    printf("DONE\n\n\n");
   }
   else if (strcmp(method, "POST") == 0)
   {
@@ -247,10 +248,15 @@
                         (uint32)strlen(p_response_header));
     Seobeo_Handle_Flush(p_cli_handle);
   }
+  goto clean_up;
 
 clean_up:
+  printf("CLEAN UP\n\n\n");
   if (p_cli_handle)
+  {
+    printf("CLEAN UP called on client handle\n\n\n");
     Seobeo_Handle_Destroy(p_cli_handle);
+  }
   if (p_response_arena)
     Dowa_Arena_Destroy(p_response_arena);
 }