Skip to content

Commit

Permalink
Update reset max_fd
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jun 7, 2014
1 parent 001e6f7 commit 51eea1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/network/Connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ SWINLINE int swServer_new_connection(swServer *serv, swEvent *ev)
if(conn_fd > swServer_get_maxfd(serv))
{
swServer_set_maxfd(serv, conn_fd);

/**
* Correction of the number of connections
*/
if (serv->connect_count > conn_fd)
{
serv->connect_count = conn_fd;
}

#ifdef SW_CONNECTION_LIST_EXPAND
//新的fd超过了最大fd

Expand Down

0 comments on commit 51eea1e

Please sign in to comment.