rtsp: check EOS in the RTSP receive and return an error code

This helps the caller detect disconnection events.

Fixes #15624
Closes #15626
This commit is contained in:
Deng Jianfeng 2024-11-22 16:59:19 +08:00 committed by Viktor Szakats
parent ae016b0cce
commit e243e73363
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -213,6 +213,11 @@ static CURLcode rtsp_done(struct Curl_easy *data,
(data->conn->proto.rtspc.rtp_channel == -1)) {
infof(data, "Got an RTP Receive with a CSeq of %ld", CSeq_recv);
}
if(data->set.rtspreq == RTSPREQ_RECEIVE &&
data->req.eos_written) {
failf(data, "Server prematurely closed the RTSP connection.");
return CURLE_RECV_ERROR;
}
}
return httpStatus;