Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8722) Fatal bugs and annoyances (resent)
Home

[Freeciv-Dev] Re: (PR#8722) Fatal bugs and annoyances (resent)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: vasc@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8722) Fatal bugs and annoyances (resent)
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Fri, 14 May 2004 13:11:44 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8722 >

On Fri, May 14, 2004 at 08:43:59AM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8722 >
> 
> > [i-freeciv-lists@xxxxxxxxxxxxx - Thu May 13 09:18:49 2004]:
> 
> > 1) The generated packet code has to cope with closed connections since
> > connections can be closed at almost any time. It would be to hard for
> > the common code to catch this and abort its execution. I will provide
> > a patch for this.
> 
> Why is it that connections can be closed at almost any time?  Wouldn't
> it make sense to only close them at the end of an operation?

A write can be fail. The code in such a case is:

      if (delayed_disconnect > 0) {
        pc->delayed_disconnect = TRUE;
        return 0;
      } else {
        if (close_callback) {
          (*close_callback)(pc);
        }
        return -1;
      }

AFAI see delayed_disconnect is in most cases 0. For the server the
callback does:

  lost_connection_to_client(pc);
  close_connection(pc);

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "How about the new language C&? No, that's not 'c ampersand', 'c reference', 
  'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the 
  hell out of people who are unfamiliar with it, and it will, of course, 
  have no pointers."
    -- Xazziri in comp.lang.c++ about C#




[Prev in Thread] Current Thread [Next in Thread]