From: Zachery Hostens Date: Thu, 8 Nov 2007 11:37:18 +0000 (-0600) Subject: update the sock->poll on the pollfd that we moved X-Git-Url: https://repo.or.cz/cnet.git/commitdiff_plain?ds=inline update the sock->poll on the pollfd that we moved --- diff --git a/cnet.c b/cnet.c index 7202591..6259a8e 100644 --- a/cnet.c +++ b/cnet.c @@ -297,6 +297,7 @@ int cnet_close (int sid) if (sock->poll < npollfds) { memcpy (&pollfds[sock->poll], &pollfds[npollfds], sizeof(*pollfds)); pollsids[sock->poll] = pollsids[npollfds]; + socks[pollsids[sock->poll]].poll = sock->poll; } memset (&pollfds[npollfds], '\0', sizeof(*pollfds));