Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC: TCP transport should use read_fully instead of read. v5.0.194 v6.0.94 #3847

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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