diff --git a/relay.pid b/relay.pid index 74620c8..9c856da 100644 --- a/relay.pid +++ b/relay.pid @@ -1 +1 @@ -2275963 +2284646 diff --git a/src/main.h b/src/main.h index 5e3a1b5..40ac7b7 100644 --- a/src/main.h +++ b/src/main.h @@ -13,8 +13,8 @@ // Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros #define CRELAY_VERSION_MAJOR 1 #define CRELAY_VERSION_MINOR 2 -#define CRELAY_VERSION_PATCH 33 -#define CRELAY_VERSION "v1.2.33" +#define CRELAY_VERSION_PATCH 34 +#define CRELAY_VERSION "v1.2.34" // Relay metadata (authoritative source for NIP-11 information) #define RELAY_NAME "C-Relay" diff --git a/src/websockets.c b/src/websockets.c index 910c338..4401064 100644 --- a/src/websockets.c +++ b/src/websockets.c @@ -405,6 +405,12 @@ static int nostr_relay_callback(struct lws *wsi, enum lws_callback_reasons reaso switch (reason) { case LWS_CALLBACK_HTTP: // Handle HTTP requests + // Mark session as active so HTTP requests don't trigger idle ban + if (pss) { + pthread_mutex_lock(&pss->session_lock); + pss->session_active = 1; + pthread_mutex_unlock(&pss->session_lock); + } { char *requested_uri = (char *)in; @@ -458,6 +464,12 @@ static int nostr_relay_callback(struct lws *wsi, enum lws_callback_reasons reaso int is_nip11_request = (strstr(accept_header, "application/nostr+json") != NULL); if (is_nip11_request) { + // Mark session as active so HTTP requests don't trigger idle ban + if (pss) { + pthread_mutex_lock(&pss->session_lock); + pss->session_active = 1; + pthread_mutex_unlock(&pss->session_lock); + } // Handle NIP-11 request if (handle_nip11_http_request(wsi, accept_header) == 0) { return 0; // Successfully handled