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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user