On Thu, Mar 31, 2005 at 02:18:07PM +0200, Steven Van Acker wrote:
then 1 minute later, this follows:
2005.03.31 14:06:06 LOG6[4553:0]: s_poll_wait timeout: connection close 2005.03.31 14:06:06 LOG5[4553:0]: Connection closed: 26 bytes sent to SSL, 0 bytes sent to socket 2005.03.31 14:06:06 LOG7[4553:0]: removing pid file /stunnel.pid 2005.03.31 14:06:06 LOG7[4552:0]: Steven: going into client_status with num_clients = 1 2005.03.31 14:06:06 LOG7[4552:0]: Process 4553 finished with code 0 (0 left)
Hi,
I've traced the problem with strace, and found that in transfer() in client.c, the code does an unintended sleep(60). This happens because no filedescriptors are added to fds, causing poll to be called like poll(0xwhatever,0,60*1000), which is the same as sleep(60);
The attached patch fixes the problem. I'm unsure whether the fix can be applied to s_poll_wait(). Are there any calls to s_poll_wait() that are intended to be sleep() calls ?
At first glance, the patch also seems to fix the second problem I had.
greets, -- Steven