Commit 1a171652 authored by Sergey Lyubka's avatar Sergey Lyubka

Sending messages every 10 seconds, to allow mongoose send PINGs

parent b6d968f0
#include <unistd.h>
#include <string.h>
#include "core.h"
#include "mongoose.h"
static void iterate_callback(struct mg_connection *c, void *param) {
if (c->is_websocket) {
......@@ -17,7 +18,7 @@ static void *timer_thread(void *param) {
int i;
for (i = 0; i < 9999999; i++) {
sleep(1);
sleep(10);
mg_iterate_over_connections(server, iterate_callback, &i);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment