cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL with NSS not properly timing out

From: David Strauss <david_at_davidstrauss.net>
Date: Wed, 8 May 2013 11:29:52 -0700

On Wed, May 8, 2013 at 5:15 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> But don't you also agree that PR_INTERVAL_NO_WAIT is more suitable than -1
> for the PR_Recv timeout parameter?

Summarizing my RHBZ comment [1], the timeout value seems completely
unused in the main send and receive functions if the non-blocking
property is properly set (which I think it is now). Still,
PR_INTERVAL_NO_WAIT is a more appropriate value to show the code's
intent.

Using PR_INTERVAL_NO_WAIT will also help prevent regression around
setting of NSS's non-blocking property. It will cause NSS to return an
error immediately if the actual socket is non-blocking, polling it
returns EWOULDBLOCK, and the NSS non-blocking property is false.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=960765#c2

--
David Strauss
   | david_at_davidstrauss.net
   | +1 512 577 5827 [mobile]
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-08