1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1598, support SLB health checking by TCP. 3.0.123

This commit is contained in:
winlin 2020-02-21 23:51:40 +08:00
parent 4a69499f2c
commit 20b9d6ab02
8 changed files with 34 additions and 3 deletions

View file

@ -76,8 +76,12 @@ srs_error_t SrsAppCasterFlv::initialize()
srs_error_t SrsAppCasterFlv::on_tcp_client(srs_netfd_t stfd)
{
srs_error_t err = srs_success;
string ip = srs_get_peer_ip(srs_netfd_fileno(stfd));
if (ip.empty() && !_srs_config->empty_ip_ok()) {
srs_warn("empty ip for fd=%d", srs_netfd_fileno(stfd));
}
SrsHttpConn* conn = new SrsDynamicHttpConn(this, stfd, http_mux, ip);
conns.push_back(conn);