2008-12-03
| ||
06:31 | • Ticket [66cbcd56a2] win32 'fossil pull' or other client side commands hang up if peer unexpected shutdown. status still Fixed with 1 other change ... (artifact: c46314b2cb user: anonymous) | |
2008-11-27
| ||
13:51 | • Fixed ticket [66cbcd56a2]. ... (artifact: 4cbd3b67c9 user: drh) | |
13:50 | On windows, a recv() call fails if the return value is less than or equal to zero. Ticket [66cbcd56a229f33af6b9a6329a7] ... (check-in: c12e5b102e user: drh tags: trunk) | |
06:50 | • New ticket [66cbcd56a2] win32 'fossil pull' or other client side commands hang up if peer unexpected shutdown.. ... (artifact: b4548d883c user: anonymous) | |
Ticket Hash: | 66cbcd56a229f33af6b9a6329a73a797d0299570 | |||
Title: | win32 'fossil pull' or other client side commands hang up if peer unexpected shutdown. | |||
Status: | Fixed | Type: | Code_Defect | |
Severity: | Minor | Priority: | ||
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2008-12-03 06:31:42 | |||
Version Found In: | a8c3a7ea92 2008-11-22T19:32:44 | |||
Description: | ||||
win32 client receive data function 'socket_read_blob()' (declared in "http.c") call 'recv()'
and test return value is negative or else. but if peer unexpected shutdown 'recv()' returns zero.
so this functon enters infinite-loop. to fix it, return value is negative or equal to zero as error.
while ( i<nToRead ){ read = recv(pSockId, rbuf, 50, 0); i += read; - if( read<0 ){ + if( read<=0 ){ return 0; } blob_append(pBlob, rbuf, read); } drh added on 2008-11-27 13:51:22: anonymous claiming to be silov.e added on 2008-12-03 06:31:42: By the way, on many OSes, recv(2) (or read(2)) returns zero if peer unexpected or expected shutdown is normal behavior. It meanings no more data or end of stream. This behavior is not win32 quirks. |