[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] IOCP: evconnlistener_free doesn't close listening socket



Ok.

How about this:

--- listener.c	2012-07-26 16:24:04.000000000 +0200
+++ listener.c.fix	2012-10-25 15:05:24.809285000 +0200
@@ -741,6 +741,9 @@
 		}
 		LeaveCriticalSection(&as->lock);
 	}
+
+ 	if (shutdown && lev->flags & LEV_OPT_CLOSE_ON_FREE)
+		evutil_closesocket(lev_iocp->fd);
 	UNLOCK(lev);
 	return 0;
 }

2012/10/25 Nick Mathewson <nickm@xxxxxxxxxxxxx>:
> On Tue, Oct 23, 2012 at 3:34 PM, Juan Pablo Fernandez
> <this.juan@xxxxxxxxx> wrote:
>> IOCP event base and listener created with LEV_OPT_CLOSE_ON_FREE.
>> Shouldn't iocp_listener_disable_impl check for LEV_OPT_CLOSE_ON_FREE?
>
> I think so!  Is this something you could write a patch for?
>
> yrs,
> --
> Nick
> ***********************************************************************
> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
> unsubscribe libevent-users    in the body.

Attachment: listener-2.0.20-iocp.patch
Description: Binary data