From: | teodor(at)postgresql(dot)org (Teodor Sigaev) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix infinite sleep and failes of send in Win32. |
Date: | 2006-10-13 13:59:48 |
Message-ID: | 20061013135948.5E0219FB2AA@postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Fix infinite sleep and failes of send in Win32.
1) pgwin32_waitforsinglesocket(): WaitForMultipleObjectsEx now called with
finite timeout (100ms) in case of FP_WRITE and UDP socket. If timeout occurs
then pgwin32_waitforsinglesocket() tries to write empty packet goes to
WaitForMultipleObjectsEx again.
2) pgwin32_send(): add loop around WSASend and pgwin32_waitforsinglesocket().
The reason is: for overlapped socket, 'ok' result from
pgwin32_waitforsinglesocket() isn't guarantee that socket is still free,
it can become busy again and following WSASend call will fail with
WSAEWOULDBLOCK error.
See http://archives.postgresql.org/pgsql-hackers/2006-10/msg00561.php
Modified Files:
--------------
pgsql/src/backend/port/win32:
socket.c (r1.13 -> r1.14)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/port/win32/socket.c.diff?r1=1.13&r2=1.14)
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2006-10-13 14:00:18 | pgsql: Fix infinite sleep and failes of send in Win32. |
Previous Message | User Hinoue | 2006-10-13 13:17:42 | psqlodbc - psqlodbc: Remove the function SQLParamOptions from ODBC3.0 . |