From a3ea83f50477c316a534654e8e674ff3fc6d02c3 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 20 Jan 2017 12:11:52 +0800 Subject: [PATCH] directly free the transport, not need to close for maybe NULL --- trunk/src/app/srs_app_http_client.cpp | 2 -- trunk/src/app/srs_app_st.hpp | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_http_client.cpp b/trunk/src/app/srs_app_http_client.cpp index 0754bf341..d1c4862a9 100644 --- a/trunk/src/app/srs_app_http_client.cpp +++ b/trunk/src/app/srs_app_http_client.cpp @@ -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); } diff --git a/trunk/src/app/srs_app_st.hpp b/trunk/src/app/srs_app_st.hpp index 606a6d947..8bcbcafa9 100644 --- a/trunk/src/app/srs_app_st.hpp +++ b/trunk/src/app/srs_app_st.hpp @@ -217,6 +217,7 @@ public: * 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 {