mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-25 16:16:50 +03:00
Bugfix in downloader (when socket recv function returns 0, it means remote end closed the connection.)
git-svn-id: svn://kolibrios.org@4345 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5e7711d4f6
commit
4565216705
@ -369,9 +369,9 @@ read_incoming_data:
|
||||
.read:
|
||||
mcall recv, [socketnum], [pos], BUFFERSIZE, 0
|
||||
inc eax ; -1 = error (socket closed?)
|
||||
jz .error
|
||||
dec eax ; 0 bytes means the remote end closed the connection
|
||||
jz .no_more_data
|
||||
dec eax ; 0 bytes...
|
||||
jz .read
|
||||
|
||||
DEBUGF 1, "Got chunk of %u bytes\n", eax
|
||||
|
||||
@ -384,6 +384,9 @@ read_incoming_data:
|
||||
; TODO: parse header and resize buffer only once
|
||||
pop eax
|
||||
jmp .read
|
||||
|
||||
.error:
|
||||
DEBUGF 1, "Socket error: %u\n", ebx
|
||||
|
||||
.no_more_data:
|
||||
mov eax, [buf_ptr]
|
||||
|
Loading…
Reference in New Issue
Block a user