Skip to content

Commit

Permalink
directly free the transport, not need to close for maybe NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jan 20, 2017
1 parent 99c13fb commit a3ea83f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions trunk/src/app/srs_app_http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ void SrsHttpClient::kbps_sample(const char* label, int64_t age)
void SrsHttpClient::disconnect()
{
kbps->set_io(NULL, NULL);

transport->close();
srs_freep(transport);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/src/app/srs_app_st.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class SrsStSocket : public ISrsProtocolReaderWriter
* client.connect();
* client.write("Hello world!", 12, NULL);
* client.read(buf, 4096, NULL);
* @remark User can directly free the object, which will close the fd.
*/
class SrsTcpClient : public ISrsProtocolReaderWriter
{
Expand Down

0 comments on commit a3ea83f

Please sign in to comment.