diff --git a/common.c b/common.c index 75a5c9b..96b6e3a 100644 --- a/common.c +++ b/common.c @@ -34,10 +34,8 @@ uint16_t get_port(struct lws *wsi) { } struct lws_context *create_context(struct lws_context_creation_info *info) { - struct lws_context *context; - info->timeout_secs = 30; - info->pt_serv_buf_size = PT_SERV_BUF_SIZE; #ifdef LWS_SERVER_OPTION_LIBUV + struct lws_context *context; info->options |= LWS_SERVER_OPTION_LIBUV; if ((context = lws_create_context(info)) != NULL) { lwsl_user("created context with libuv"); diff --git a/common.h b/common.h index 8175274..64089fe 100644 --- a/common.h +++ b/common.h @@ -5,7 +5,7 @@ #include "libwebsockets.h" #ifndef WSS_PLUGIN_VERSION -#define WSS_PLUGIN_VERSION "0.3.2" +#define WSS_PLUGIN_VERSION "0.3.3" #endif #ifndef RX_BUFFER_SIZE diff --git a/wss-plugin-client.c b/wss-plugin-client.c index ebea63c..30fdbdd 100644 --- a/wss-plugin-client.c +++ b/wss-plugin-client.c @@ -402,6 +402,8 @@ int main(int argc, char **argv) { info.protocols = protocols; info.vhost_name = "context"; info.user = &context_data; + info.timeout_secs = 30; + info.pt_serv_buf_size = PT_SERV_BUF_SIZE; context = create_context(&info); if (!context) { lwsl_err("cannot create context"); diff --git a/wss-plugin-server.c b/wss-plugin-server.c index 6c00ef5..59dcfa2 100644 --- a/wss-plugin-server.c +++ b/wss-plugin-server.c @@ -315,6 +315,8 @@ int main(int argc, char **argv) { info.protocols = protocols; info.vhost_name = "context"; info.user = &context_data; + info.timeout_secs = 30; + info.pt_serv_buf_size = PT_SERV_BUF_SIZE; context = create_context(&info); if (!context) { lwsl_err("cannot create context");