Skip to content

Commit

Permalink
SrsRtcTcpConn: use read_fully instead of read.(#3842)
Browse files Browse the repository at this point in the history
  • Loading branch information
chundonglinlin committed Oct 20, 2023
1 parent 4e7c075 commit f24ea28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_rtc_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ srs_error_t SrsRtcTcpConn::read_packet(char* pkt, int* nb_pkt)

// Read length in 2 bytes @doc: https://www.rfc-editor.org/rfc/rfc4571#section-2
ssize_t nread = 0; uint8_t b[2];
if((err = skt_->read((char*)b, sizeof(b), &nread)) != srs_success) {
if((err = skt_->read_fully((char*)b, sizeof(b), &nread)) != srs_success) {
return srs_error_wrap(err, "rtc tcp conn read len");
}

Expand Down

0 comments on commit f24ea28

Please sign in to comment.