[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Re : [Libevent-users] libevent client tries to reconnect to a lost server
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: Re : [Libevent-users] libevent client tries to reconnect to a lost server
- From: Nick Mathewson <nickm@xxxxxxxxxxxxx>
- Date: Mon, 14 Jan 2013 17:58:02 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 14 Jan 2013 17:58:05 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=75yt665/JFnJgGmUhCsiZMJUiDs4ybRe+Uvc4IU9sXg=; b=G3LyVpAV3/ebMiqsdwUPOBBtghyfHAm1eZvmQfdzxzVKkM7EQ77Kz2+d7OxTyJY4iI LV+t+hGEqkiBGVHkJcg1exG2xxkTKb+CDmJMnismkUdUZg1Wkjw1SZwEFwS0yBcxZG7n xEKvIqW7+UM4N57VsZ2KY3/RvxdWXgvjVUmLui7Ca5AZVwQbZNcluolOR7P1YNWfa49b Coqc8Tj94TB4Y5HqJ4m3eDysSVOs9SSR+e7RYknIcNgWDWhmSePKEfC2qP3duwNWCMxS AezbCX157eQ9X3x7z/oBTIRAWab2z6gGxTmPVphWE6pR4D0Rj0g/uIpio43w+Yfvn7S+ nodw==
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Mon, Jan 14, 2013 at 5:52 PM, <ssod@xxxxxxx> wrote:
> It serms that this is not the way it should be done. The whole buffer event should be removed and created again, until the server starts to respond. Unfortunately this method causes a segmentation fault. I had no idea of how such a simple problem can be solved with libevent. I couldn't be able to find an example.
>
Hi, Steve!
It's not clear to me what you're actually trying to do. You want to
have a bufferevent, try to do some operation on it, and if the
operation fails, retry later? Right now, bufferevents don't support
retrying connections very well, but they should do okay if you first
setfd the fd to -1 before retrying the connection--or just make a new
bufferevent for each connection.
If you have a short example program you can post here, probably
somebody could help figuring out what's going on. But without more
information, it's not easy to tell what the problem is.
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.