Bug in IrssComms (Socket.Receive) (1 Viewer)

Clinton

Portal Member
October 2, 2008
27
9
The bug reported here interferes with the message flow between clients (such as Translator) and IrServer. The symptoms are intermittent and infrequent, but include missing or corrupted IR blasts. The problems are more likely to occur under high system load (e.g. shortly after resume from standby).

IrssComms assumes that one Socket.Send always corresponds with one Socket.Receive, i.e. that message boundaries are respected on the communication link. This assumption happens to be almost always correct for the kind of traffic generated in IRSS. However, the system will sometimes deliver a message in more than one part. When this happens, IrssComms causes the client (e.g. Translator) to disconnect. Translator will promptly reconnect, but in the meantime information will have been lost.

Fortunately, coming up with a solution was easier than tracking the problem down (see the attached 2 source code modules).

Removing this bug has improved performance for me, and may also help other users who have reported occasional IR blasting errors.

Could one of the devs please respond.

Thanks

===
Patch updated 2010-02-19
 

Attachments

  • IrssCommsSocketReceiveError(2ndTry).zip
    30.7 KB

Clinton

Portal Member
October 2, 2008
27
9
Thanks, chefkock.
Actually, I overlooked a detail :oops:. The patch fixes the bug, but fails to handle the case of attempting to read from a socket after it has been closed. This means that a client will not automatically reconnect if IRServer is stopped and restarted. I have updated the patch and will post it as soon as I am sure it works!
 

mortstar

MP Donator
  • Premium Supporter
  • January 30, 2008
    415
    41
    Home Country
    England England
    This patch is great, I bet it was a nightmare to track down.

    Just installed the latest release of IRSS and the little glitches that happened every now and then are gone. No more random pausing of media whilst navigating around the GUI :)

    Big thanks
     

    Users who are viewing this thread

    Top Bottom