Skip to content

Commit

Permalink
Merge pull request #45 from tibbotech/firmware_dl_fixes
Browse files Browse the repository at this point in the history
http and filenum fixes for firmware upgrades
  • Loading branch information
salhk authored Apr 9, 2024
2 parents 54b15f6 + d5b4634 commit 88f15bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion filenum/filenum.tbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ public function filenum_open(byref signature as string, byref filename as string
filenum_debugprint("'"+signature+"' tried to open file '"+filename+"'. This file is already opened on file number "+str(filenum_open)+".")
#endif

fd.filenum=f
status=PL_FD_STATUS_OK
filenum_open=f
exit function
if fd.fileopened=YES then
exit function
else
fd.close()
exit for
end if
end if
end if
next f
Expand Down
2 changes: 1 addition & 1 deletion http/http.tbs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ sub http_sock_state_update(newstatesimple as enum pl_sock_state_simple)
if http_check_socket_list()=NG then
exit sub
end if
if sock.statesimple=PL_SSTS_CLOSED and http_request_item.state >= DNS_COMPLETE then
if sock.statesimple=PL_SSTS_CLOSED and http_request_item.state >= DNS_COMPLETE and sock.rxlen=0 then
http_failed("Connection closed")
exit sub
end if
Expand Down

0 comments on commit 88f15bc

Please sign in to comment.