Skip to content

Commit

Permalink
http and filenum fixes for firmware upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMassot committed Apr 9, 2024
1 parent 3ee05d6 commit b47a135
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion filenum/filenum.tbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ 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
sys.trace("closing\r\n")
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 b47a135

Please sign in to comment.