Commit graph

11 commits

Author SHA1 Message Date
Andy Green
60d656fb0f check oom on lws_malloc
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-12 21:54:29 +08:00
Andy Green
3564e3d5e9 libuv add idle processing to force service where needed
https://github.com/warmcat/libwebsockets/issues/485

Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-07 18:56:40 +08:00
Meir Yanovich
b1f80eeeb7 libuv win32 fixes 2
https://github.com/warmcat/libwebsockets/issues/411#issuecomment-204284368
2016-04-05 07:31:16 +08:00
Andy Green
934cc80d95 libuv win32 fixes
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-05 07:31:11 +08:00
Denis Osvald
3d033984f5 libuv: handle signals only if requested
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-03-23 08:04:39 +08:00
Alex Hultman
3eb59c90bf libuv.c: Service fd with LWS_POLLHUP on poll errors 2016-03-02 18:59:55 +08:00
Andy Green
6671327c8d libuv create 1Hz background timeout check
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-29 01:09:01 +08:00
Alex Hultman
1499ab6b33 Stop uv loop in default signal handler, clean-ups 2016-02-20 23:06:32 +08:00
Alex Hultman
a3a0792012 Make sure every handle is closed before destroying the uv loop 2016-02-20 22:50:53 +08:00
Alex Hultman
f2ee57e734 Don't destroy ev/uv loops if they haven't been created yet 2016-02-20 19:35:33 +08:00
Andy Green
86ed65ff00 libuv integration
This gets the libuv stuff plumbed in and working.

Currently it's only workable for some service thread, and there
is an isolated valgrind problem left

==28425== 128 bytes in 1 blocks are definitely lost in loss record 3 of 3
==28425==    at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28425==    by 0x4C2AB1E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28425==    by 0x58BBB27: maybe_resize (core.c:748)
==28425==    by 0x58BBB27: uv__io_start (core.c:787)
==28425==    by 0x58C1B80: uv__signal_loop_once_init (signal.c:225)
==28425==    by 0x58C1B80: uv_signal_init (signal.c:260)
==28425==    by 0x58BF7A6: uv_loop_init (loop.c:66)
==28425==    by 0x4157F5: lws_uv_initloop (libuv.c:89)
==28425==    by 0x405536: main (test-server-libuv.c:284)

libuv wants to sign off on all libuv 'handles' that will close, and
callback to do the close confirmation asynchronously.  The wsi close function
is adapted when libuv is in use to work with libuv accordingly and exit the uv
loop the number of remaining wsi is zero.

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-14 09:31:13 +08:00