Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-25-2008, 01:07 PM
irv0
Fire Beetle
 
Join Date: Jul 2003
Posts: 3
Default A possible linkdeath fix

Submitting this for your consideration.

A friend and I have been playing on our own eqemu server for a couple of weeks now. Unfortunately his ISP seems to suffer from occasional bouts of packet loss. At generally random but frequent intervals he would be running along, fighting or just standing around and find he could receive chat messages but not send his own, cast spells, /con mobs, etc.

A look at the logs revealed that his client seemed to be deciding to continually retransmit certain packets and/or fragments part of a larger sequence for which it apparently did not receive an acknowledgment from the server. His client continues to send the same single or sequence of packets over and over until it eventually gives up and he gets the you have been disconnected message.

The current code in EQStream.cpp logs but otherwise ignores packets received from the client that are older than the current sequence number. It seemed logical to me to have the server send an out-of-order ack to the client to make it happy:

Code:
--- EQEmu-0.7.0-1118/common/EQStream.cpp.orig   2008-06-25 16:50:09.000000000 +0000
+++ EQEmu-0.7.0-1118/common/EQStream.cpp        2008-06-25 16:50:47.000000000 +0000
@@ -178,6 +178,8 @@
                                _raw(NET__DEBUG, seq, p);
                                //kludge to see if it helps:
                                //SendAck(GetLastAckSent());
+
+                               SendOutOfOrderAck(seq);
                        } else {
                                // In case we did queue one before as well.
                                EQProtocolPacket *qp=RemoveQueue(seq);
@@ -222,6 +224,8 @@
                        } else if (check == SeqPast) {
                                _log(NET__DEBUG, _L "Duplicate OP_Fragment: Expecting Seq=%d, but got Seq=%d" __L, NextInSeq, seq);
                                _raw(NET__DEBUG, seq, p);
+
+                               SendOutOfOrderAck(seq);
                        } else {
                                // In case we did queue one before as well.
                                EQProtocolPacket *qp=RemoveQueue(seq);
This change may very well be a kludge, but it seems to be working well (for the last week or so). Even though my friend is still suffering from some packet loss here and there, he no longer goes linkdead and the game is now playable.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:48 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3