- Notifications
You must be signed in to change notification settings - Fork5
Commit47df6e7
committed
Fix infinite sleep and failes of send in Win32.
1) pgwin32_waitforsinglesocket(): WaitForMultipleObjectsEx now called withfinite timeout (100ms) in case of FP_WRITE and UDP socket. If timeout occursthen pgwin32_waitforsinglesocket() tries to write empty packet goes toWaitForMultipleObjectsEx again.2) pgwin32_send(): add loop around WSASend and pgwin32_waitforsinglesocket().The reason is: for overlapped socket, 'ok' result frompgwin32_waitforsinglesocket() isn't guarantee that socket is still free,it can become busy again and following WSASend call will fail withWSAEWOULDBLOCK error.Seehttp://archives.postgresql.org/pgsql-hackers/2006-10/msg00561.php1 parentefa0e86 commit47df6e7
1 file changed
+81
-25
lines changedLines changed: 81 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
105 | 116 |
| |
106 | 117 |
| |
107 | 118 |
| |
108 | 119 |
| |
109 | 120 |
| |
| 121 | + | |
110 | 122 |
| |
111 | 123 |
| |
112 | 124 |
| |
| |||
127 | 139 |
| |
128 | 140 |
| |
129 | 141 |
| |
130 |
| - | |
131 |
| - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
132 | 148 |
| |
133 | 149 |
| |
134 | 150 |
| |
| |||
140 | 156 |
| |
141 | 157 |
| |
142 | 158 |
| |
143 |
| - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
144 | 199 |
| |
145 | 200 |
| |
146 | 201 |
| |
| |||
280 | 335 |
| |
281 | 336 |
| |
282 | 337 |
| |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
296 | 355 |
| |
297 |
| - | |
298 |
| - | |
| 356 | + | |
299 | 357 |
| |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 |
| - | |
304 |
| - | |
| 358 | + | |
| 359 | + | |
305 | 360 |
| |
306 |
| - | |
| 361 | + | |
| 362 | + | |
307 | 363 |
| |
308 | 364 |
| |
309 | 365 |
| |
|
0 commit comments
Comments
(0)