Re: [Evolution-hackers] Closing a NSS connection
- From: Matthew Barnes <mbarnes redhat com>
- To: Philip Van Hoof <spam pvanhoof be>
- Cc: evolution-hackers <evolution-hackers gnome org>
- Subject: Re: [Evolution-hackers] Closing a NSS connection
- Date: Sat, 15 Dec 2007 10:02:27 -0500
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.
Matthew Barnes
[1] http://developer.mozilla.org/en/docs/PR_Close
[2] http://developer.mozilla.org/en/docs/PR_Shutdown
[3] http://www.mozilla.org/projects/nspr/reference/html/prlayer.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]