sse example: set http_timeout to 0.

This commit is contained in:
Joris Vink 2025-02-10 13:59:29 +01:00
parent 542c0f1a29
commit 681e3b2b6e

View File

@ -61,6 +61,7 @@ page(struct http_request *req)
int
subscribe(struct http_request *req)
{
struct connection *c;
struct sse_state *state;
char *hello = "event:join\ndata: client\n\n";
@ -103,6 +104,10 @@ subscribe(struct http_request *req)
http_response_header(req, "content-type", "text/event-stream");
http_response(req, 200, NULL, 0);
/* Kill HTTP timeouts. */
c = req->owner;
c->http_timeout = 0;
return (KORE_RESULT_OK);
}