mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1045, revert macro for TCP keepalive detection, use system macro
This commit is contained in:
parent
911cd448f1
commit
366309ce2d
2 changed files with 3 additions and 5 deletions
|
@ -223,7 +223,9 @@ int SrsTcpListener::listen()
|
|||
}
|
||||
srs_verbose("setsockopt reuse-addr success. port=%d, fd=%d", port, _fd);
|
||||
|
||||
#ifdef SRS_PERF_SO_KEEPALIVE
|
||||
// Detect alive for TCP connection.
|
||||
// @see https://github.com/ossrs/srs/issues/1044
|
||||
#ifdef SO_KEEPALIVE
|
||||
int tcp_keepalive = 1;
|
||||
if (setsockopt(_fd, SOL_SOCKET, SO_KEEPALIVE, &tcp_keepalive, sizeof(int)) == -1) {
|
||||
ret = ERROR_SOCKET_SETKEEPALIVE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue