Re: [Evolution-hackers] Closing a NSS connection
- From: Srinivasa Ragavan <sragavan novell com>
- To: Matthew Barnes <mbarnes redhat com>
- Cc: evolution-hackers <evolution-hackers gnome org>, Philip Van Hoof <spam pvanhoof be>
- Subject: Re: [Evolution-hackers] Closing a NSS connection
- Date: Sat, 15 Dec 2007 21:27:26 +0530
On Sat, 2007-12-15 at 10:02 -0500, Matthew Barnes wrote:
> On Sat, 2007-12-15 at 13:53 +0100, Philip Van Hoof wrote:
> > I don't think just doing a PR_Close is sufficient. I think you need to
> > do a PR_Shutdown too. GMail's IMAP server, for example, after pressing
> > really often connect-disconnect, will otherwise ban you from authent-
> > icating for a few minutes.
> >
> > I think this patch can be 1:1 applied to upstream Camel.
> >
> > http://tinymail.org/trac/tinymail/changeset/3135
>
> Yeah, I think Philip's right. The NSPR API documentation for PR_Close
> [1] and PR_Shutdown [2] is not very helpful, but I did manage to find
> this:
>
> Once the exchange has been accomplished, the transport is shut
> down with a call to PR_Shutdown, as shown in line 106. This
> operation effectively disables any further use of the file
> descriptor for anything other than closing it. The call to
> PR_Shutdown does not, however, eliminate the need to close the
> descriptor. The call to PR_Close is in main() (the creator the
> the TCP stream) and is required to reclaim the resources used by
> the runtime to support the connection. [3]
>
> So I'll commit this for 2.21.4.
Thanks Matt and Philip.
-Srini
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]