Fixed that a stopped Download Kill the server.

This commit is contained in:
René Linder 2024-09-20 11:07:37 +02:00
parent fe883004f8
commit bfd39d7558

View file

@ -1134,7 +1134,7 @@ Module lhs_web
sent_total = thread_temp_file_readed+(thread_buffer_offset-thread_buffer) sent_total = thread_temp_file_readed+(thread_buffer_offset-thread_buffer)
EndIf EndIf
ldl::Logging("Memory send_total:"+Str(sent_total)) ldl::Logging("Memory send_total:"+Str(sent_total))
;TODO: Stoped download kill server... ;Erledigt: Stoped download kill server...
If m_clients(Str(thread_cli_id))\client_type = #client_HTTPS If m_clients(Str(thread_cli_id))\client_type = #client_HTTPS
sent_length = sent_total sent_length = sent_total
sent_buffer_address = thread_buffer sent_buffer_address = thread_buffer
@ -1181,7 +1181,13 @@ Module lhs_web
sent_buffer_address = thread_buffer sent_buffer_address = thread_buffer
sent_total = 0 sent_total = 0
Repeat Repeat
sent = lsocket::WriteSocket(thread_cli_id, thread_buffer , sent_length) If lsocket::IsClientSocket(thread_cli_id)
sent = lsocket::WriteSocket(thread_cli_id, thread_buffer , sent_length)
Else
thread_alive=#False
Break 2
EndIf
If sent <> -1 If sent <> -1
ldl::Logging("HTTP Sent:"+Str(sent)+" bytes") ldl::Logging("HTTP Sent:"+Str(sent)+" bytes")
sent_length - sent sent_length - sent