mirror of
https://github.com/curl/curl.git
synced 2026-05-14 21:56:22 +03:00
tftp: propagate expired timer from tftp_state_timeout()
When Curl_timeleft() < 0 we used to return 0, masking the expiry and skipping the caller’s (timeout_ms < 0) path. Now we set FIN and return the negative value so tftp_multi_statemach() aborts with CURLE_OPERATION_TIMEDOUT as intended. Closes #18574
This commit is contained in:
parent
f8175b1536
commit
ad147ec53d
1 changed files with 1 additions and 1 deletions
|
|
@ -1184,7 +1184,7 @@ static timediff_t tftp_state_timeout(struct tftp_conn *state,
|
|||
if(timeout_ms < 0) {
|
||||
state->error = TFTP_ERR_TIMEOUT;
|
||||
state->state = TFTP_STATE_FIN;
|
||||
return 0;
|
||||
return timeout_ms;
|
||||
}
|
||||
current = time(NULL);
|
||||
if(current > state->rx_time + state->retry_time) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue