- ns = accept(tcp->fd, (struct sockaddr *)&name, &namelen);
- if(ns < 0) {
- flog(LOG_ERR, "accept: %s", strerror(errno));
- goto out;
+ n = 0;
+ while(1) {
+ ns = accept(tcp->fd, (struct sockaddr *)&name, &namelen);
+ if(ns < 0) {
+ if(errno == EAGAIN)
+ break;
+ flog(LOG_ERR, "accept: %s", strerror(errno));
+ goto out;
+ }
+ mustart(servetcp, ns, name, tcp);
+ if(++n >= 100)
+ break;