<pre>Hi,</pre><pre>   Thank you for your answer! Actually when they disconnect properly, there is no problem. It is in case of crash that we have this problem. Unfortunately it happens ;)</pre><pre>//Alain</pre><pre>Hi Alain,

Is it possible for your peers to send a disconnection message before going
away ?

regards,
Ju


On Thu, Nov 5, 2009 at 2:03 PM, Alain Becam &lt;<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss">Al at thegiantball.com</a>&gt; wrote:

&gt;<i> Hello,
</i>&gt;<i>      Greetings from a new happy user. We are using ENet has the &quot;low-level&quot;
</i>&gt;<i> communication API for an object-oriented solution, with object replication.
</i>&gt;<i> Thanks for this great library !
</i>&gt;<i>
</i>&gt;<i> Mostly for debug purposes, we increased the TIME_OUT, like that:
</i>&gt;<i>
</i>&gt;<i>    ENET_PEER_TIMEOUT_LIMIT                = 3200, // 32
</i>&gt;<i>    ENET_PEER_TIMEOUT_MINIMUM              = 5000, // 5000
</i>&gt;<i>    ENET_PEER_TIMEOUT_MAXIMUM              = 300000, // 30000
</i>&gt;<i>
</i>&gt;<i> It works well to avoid too quick disconnections, but we still have a
</i>&gt;<i> problem. When a new peer connect, it receives the list of existing peers
</i>&gt;<i> from the server, then try to connect to all peers, and when done, send an
</i>&gt;<i> acknowledgment to the server. Then the server replicates the existing
</i>&gt;<i> objects. But with these time-out, a disconnected peer is discovered after a
</i>&gt;<i> very long time, and if a new peer connect, it will never send the ack to the
</i>&gt;<i> server (because he is waiting for the connection and until it receives the
</i>&gt;<i> disconnection event).
</i>&gt;<i>
</i>&gt;<i> We tried to do that in protocol.c (line 1270):
</i>&gt;<i>
</i>&gt;<i> outgoingCommand -&gt; roundTripTimeoutLimit = (ENET_PEER_TIMEOUT_LIMIT/100) *
</i>&gt;<i> outgoingCommand -&gt; roundTripTimeout;
</i>&gt;<i>
</i>&gt;<i> But it seems to have some nasty side-effects (when some communications are
</i>&gt;<i> occurring, it might disconnect very quickly again)...
</i>&gt;<i>
</i>&gt;<i> Any way to have a quick disconnection and still a long time-out for comms ?
</i>&gt;<i>
</i>&gt;<i> Kind regards,
</i>&gt;<i>     Alain
</i>&gt;<i>
</i>&gt;<i> _______________________________________________
</i>&gt;<i> ENet-discuss mailing list
</i>&gt;<i> <a href="http://lists.cubik.org/mailman/listinfo/enet-discuss">ENet-discuss at cubik.org</a>
</i>&gt;<i> <a href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a>
</i>&gt;<i>
</i>&gt;<i>
</i></pre><br>