Re: PR_Write blocks indefinitely

"Wan-Teh Chang" <[email protected]> Mon, 27 Oct 2008 09:46:24 -0700
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
On Sat, Oct 25, 2008 at 2:59 AM, Monkeon <[email protected]> wrote:
>
> Hi,
>
> A client is witnessing a problem in our product where we attempt to send
> something via a PR_Write, but it never succeeds, or it at least appears to
> never succeed, as we never leave the call.  This issue has been witnessed on
> calls to other internal/local ports and also to external ports (i.e. another
> machine).  This issue is happening very intermittently and there certainly
> appears to be no pattern to the success/failure of the call.
>
> Has anybody witnessed behaviour like this before?

If the socket is in blocking mode, you're trying to send a lot of
data (for example, more than 64 KB), and the server is not reading,
PR_Write can block indefinitely until either the server starts reading
or the TCP connection is closed.

Wan-Teh