changeset 5323:742ab5ed32b8 draft

eloop: if we take a free event, add it to the main queue Otherwise it goes into the ether....
author Roy Marples <roy@marples.name>
date Sun, 07 Jun 2020 23:39:46 +0100
parents 3dd079b1d37b
children e5cbedfa3dd9
files src/eloop.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/eloop.c	Sat Jun 06 20:52:28 2020 +0100
+++ b/src/eloop.c	Sun Jun 07 23:39:46 2020 +0100
@@ -326,8 +326,8 @@
 			e = malloc(sizeof(*e));
 			if (e == NULL)
 				return -1;
-			TAILQ_INSERT_HEAD(&eloop->events, e, next);
 		}
+		TAILQ_INSERT_HEAD(&eloop->events, e, next);
 		e->fd = fd;
 		eloop->nevents++;
 	}