fix bug of mem leak, free the left msgs if send error
This commit is contained in:
parent
befde6acf7
commit
9ba786d1aa
|
|
@ -493,7 +493,7 @@ int SrsEdgeForwarder::cycle()
|
||||||
|
|
||||||
if ((ret = client->send_and_free_message(msg)) != ERROR_SUCCESS) {
|
if ((ret = client->send_and_free_message(msg)) != ERROR_SUCCESS) {
|
||||||
srs_error("edge publish forwarder send message to server failed. ret=%d", ret);
|
srs_error("edge publish forwarder send message to server failed. ret=%d", ret);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// free the array itself.
|
// free the array itself.
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ int SrsForwarder::forward()
|
||||||
|
|
||||||
if ((ret = client->send_and_free_message(msg)) != ERROR_SUCCESS) {
|
if ((ret = client->send_and_free_message(msg)) != ERROR_SUCCESS) {
|
||||||
srs_error("forwarder send message to server failed. ret=%d", ret);
|
srs_error("forwarder send message to server failed. ret=%d", ret);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// free the array itself.
|
// free the array itself.
|
||||||
|
|
|
||||||
|
|
@ -543,7 +543,7 @@ int SrsRtmpConn::playing(SrsSource* source)
|
||||||
|
|
||||||
if ((ret = rtmp->send_and_free_message(msg)) != ERROR_SUCCESS) {
|
if ((ret = rtmp->send_and_free_message(msg)) != ERROR_SUCCESS) {
|
||||||
srs_error("send message to client failed. ret=%d", ret);
|
srs_error("send message to client failed. ret=%d", ret);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// free the array itself.
|
// free the array itself.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user