io_uv: fixed example_notification_async
@@ -57,11 +57,7 @@ static void onSIGNAL (int signal)
{
if (signal == SIGINT)
{
-#ifdef HAVE_LIBUV1
- uv_loop_close (uv_default_loop ());
-#elif HAVE_LIBUV0
- uv_loop_delete (uv_default_loop ());
-#endif
+ uv_stop (uv_default_loop ());
}
}
@@ -137,6 +133,11 @@ int main (void)
elektraIoBindingCleanup (binding);
uv_run (loop, UV_RUN_ONCE); // allow cleanup
+#ifdef HAVE_LIBUV1
+ uv_loop_close (uv_default_loop ());
+#elif HAVE_LIBUV0
+ uv_loop_delete (uv_default_loop ());
+#endif
ksDel (config);
keyDel (intKeyToWatch);
