]> jfr.im git - irc/quakenet/newserv.git/commitdiff
trusts_policy: Properly close sockets on error.
authorGunnar Beutner <redacted>
Sun, 4 Aug 2013 14:43:58 +0000 (16:43 +0200)
committerGunnar Beutner <redacted>
Sun, 4 Aug 2013 14:43:58 +0000 (16:43 +0200)
--HG--
branch : shroudtrusts

trusts/trusts_policy.c

index a14af1ad27ec035d82f3d3dffc8796277a2a09be..8bebb3c53b1e9182efe600cac3715c27923197dc 100644 (file)
@@ -352,7 +352,12 @@ static void processtrustclient(int fd, short events) {
 
   if(!sock)
     return;
-  
+
+  if (events & (POLLPRI | POLLERR | POLLHUP | POLLNVAL)) {
+    trustfreeconnection(sock, 1);
+    return;
+  }
+
   if(events & POLLIN)
     if(!handletrustclient(sock))
       trustfreeconnection(sock, 1);