  {
  	int fd;
  	struct client *p;
-@@ -339,7 +395,11 @@ control_activity(int s)
+@@ -339,7 +409,11 @@ control_activity(int s)
  		close(fd);
  		return;
  	}

 		if (!FD_ISSET(p->fd, &writefds))
 			continue;
 
@@ -323,9 +357,31 @@ top:
 		goto top;
 }
 

 /* Alarm handler for timeout waiting on client connect */
 static void
 	alarm_handler(int sig)
@@ -454,15 +530,71 @@ static void
 	exit(sig);
 }
 
