From 3aa11139582f22a13c98f29cf8797a0782ad22d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Fern=C3=A1ndez=20D=C3=ADaz?= <42654671+oscfdezdz@users.noreply.github.com> Date: Thu, 16 Jan 2025 00:33:22 +0100 Subject: [PATCH] web: Set sessions' timeout to 30 seconds To prevent endless loading. --- src/web/exm-image-resolver.c | 2 +- src/web/exm-request-handler.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/exm-image-resolver.c b/src/web/exm-image-resolver.c index a47543d4..ed0e413f 100644 --- a/src/web/exm-image-resolver.c +++ b/src/web/exm-image-resolver.c @@ -146,6 +146,6 @@ exm_image_resolver_class_init (ExmImageResolverClass *klass) static void exm_image_resolver_init (ExmImageResolver *self) { - self->session = soup_session_new (); + self->session = soup_session_new_with_options ("timeout", 30, NULL); g_mutex_init (&self->mutex); } diff --git a/src/web/exm-request-handler.c b/src/web/exm-request-handler.c index 2dbf7c04..c664a3cc 100644 --- a/src/web/exm-request-handler.c +++ b/src/web/exm-request-handler.c @@ -183,5 +183,5 @@ static void exm_request_handler_init (ExmRequestHandler *self) { ExmRequestHandlerPrivate *priv = exm_request_handler_get_instance_private (self); - priv->session = soup_session_new (); + priv->session = soup_session_new_with_options ("timeout", 30, NULL); }