[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Event after close
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] Event after close
- From: Nick Mathewson <nickm@xxxxxxxxxxxxx>
- Date: Wed, 18 Aug 2010 10:47:32 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Wed, 18 Aug 2010 10:47:40 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=wIqNZjMoqqtOOVn8feruSSmVVuOJIrTDHIqdaSsywEQ=; b=pXIcV0JZcX+T2eQrLo7KBj9K70mCIE9J9EKmdc+cTLQAqeLK0h090ChYaKDSo7SpXP SL9PQBujH1q0OEbCQAZs3lG7V/HnhyOpr8dG3SQgGWjLTAIkvRM4F/gabyzyfz1lBoXW Hs9gcdPf7GflA/orR0BzFKpcI8RCpjL/g7PJY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=s9NBpUVoIY5DGXbiqFekMtEWaMo7Qvyf/tJuBhhmJCZcpby8YKLvRuvGYFiWEcP+Tl mkVX6u/uTZIcT9Gj4N9kSOEDfxFG6SCFw4yfB9/hAqj8cAJhUKzgh+0c2/lz3waDNJIZ Y/KhVwKLi1Lb3pfnYoxf286fJVGU1RzkaY6G4=
- In-reply-to: <003e01cb3ee3$daa3fe70$8febfb50$@com>
- References: <003e01cb3ee3$daa3fe70$8febfb50$@com>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Wed, Aug 18, 2010 at 10:44 AM, Gilad Benjamini
<gilad@xxxxxxxxxxxxxxxxx> wrote:
> I have a read event on a socket. At some point I realize the connection is
> broken.
> I delete the event and close the socket.
> If the socket had pending data at that point, is there a chance that I will
> get a read event ? I.e. an event on a socket that's already closed ?
If you have deleted the event, you should never get it. Only events
that are "pending" (i.e., added) can get their callbacks called.
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.