mirror of
https://github.com/jorisvink/kore
synced 2025-03-06 18:29:01 -05:00
sse example: set http_timeout to 0.
This commit is contained in:
parent
542c0f1a29
commit
681e3b2b6e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user