1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 21:03:12 +02:00

- Poll I/O engine: get_client_by_pollfd() may return -1 when there's a race

condition. Don't abort, instead just skip those clients.
  This fixes a crash I had on /SQUIT.
This commit is contained in:
Bram Matthys
2012-03-26 11:16:10 +02:00
parent 46372dc475
commit 3ada59bc60
2 changed files with 4 additions and 2 deletions
+3
View File
@@ -2410,3 +2410,6 @@
- Split up PROTOCTL line, since with the addition of ESVID we exceeded
MAXPARA when using ZIP links.
This caused an odd charset warning upon link.
- Poll I/O engine: get_client_by_pollfd() may return -1 when there's a race
condition. Don't abort, instead just skip those clients.
This fixes a crash I had on /SQUIT.
+1 -2
View File
@@ -204,8 +204,7 @@ int v;
if ((fd < 0) || (fd >= MAXCONNECTIONS))
abort();
v = pollfd_to_client[fd];
if ((v < 0) && (v != POLL_RESOLVER))
abort();
/* v may be negative, both when it's POLL_RESOLVER and during a race condition */
return v;
}
#else