Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-13 Thread Yahel Zamir
On Jul 12, 8:59 pm, Wan-Teh Chang <[EMAIL PROTECTED]> wrote: > Yahel Zamir wrote: > > > OK... Since my application does not use PRThread's I guess should > > obtain the PRThread id of the Read thread and the Write thread (using > > PR_GetCurrentThread), and then we can interrupt each thread by call

Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-12 Thread Wan-Teh Chang
Yahel Zamir wrote: > > OK... Since my application does not use PRThread's I guess should > obtain the PRThread id of the Read thread and the Write thread (using > PR_GetCurrentThread), and then we can interrupt each thread by calling > PR_Interrupt. As a result, both blocking calls will return an e

Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-11 Thread Yahel Zamir
On Jul 12, 12:36 am, Wan-Teh Chang <[EMAIL PROTECTED]> wrote: > Yahel Zamir wrote: > > > Yes, clearly PR_Shutdown was written to block until the lock is > > available... So I would like to rephrase my question -- when an NSPR > > socket is blocking on Read or Write, what is the way to move the > >

Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-11 Thread Wan-Teh Chang
Yahel Zamir wrote: > > Yes, clearly PR_Shutdown was written to block until the lock is > available... So I would like to rephrase my question -- when an NSPR > socket is blocking on Read or Write, what is the way to move the > socket out of that state (avoiding the workaround of using timeout for

Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-11 Thread Yahel Zamir
On Jul 10, 10:57 pm, Wan-Teh Chang <[EMAIL PROTECTED]> wrote: > Yahel Zamir wrote: > > Hi, > > > I have encountered a problem in using SSL sockets in blocking mode. My > > application is multi threaded, with one thread waiting to read and > > another that is waiting to write. Upon some external inp

Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-10 Thread Wan-Teh Chang
Yahel Zamir wrote: > Hi, > > I have encountered a problem in using SSL sockets in blocking mode. My > application is multi threaded, with one thread waiting to read and > another that is waiting to write. Upon some external input, a third > thread tries to shutdown the connection and then close th

Re: PR_Close and PR_Shutdown hang if an SSL socket is blocking on Read

2007-07-10 Thread Yahel Zamir
Oops, I forgot some details - we are using NSS-3.11.4 and NSPR-4.6.4 on a RedHat Linux with Kernel 2.4, using gcc 3.4.5. On Jul 10, 5:36 pm, Yahel Zamir <[EMAIL PROTECTED]> wrote: > Hi, > > I have encountered a problem in using SSL sockets in blocking mode. My > application is multi threaded, with