mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
a6871052af
commit
911cd448f1
4 changed files with 9 additions and 2 deletions
|
@ -223,7 +223,7 @@ int SrsTcpListener::listen()
|
|||
}
|
||||
srs_verbose("setsockopt reuse-addr success. port=%d, fd=%d", port, _fd);
|
||||
|
||||
#ifdef SO_KEEPALIVE
|
||||
#ifdef SRS_PERF_SO_KEEPALIVE
|
||||
int tcp_keepalive = 1;
|
||||
if (setsockopt(_fd, SOL_SOCKET, SO_KEEPALIVE, &tcp_keepalive, sizeof(int)) == -1) {
|
||||
ret = ERROR_SOCKET_SETKEEPALIVE;
|
||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 244
|
||||
#define VERSION_REVISION 245
|
||||
|
||||
// generated by configure, only macros.
|
||||
#include <srs_auto_headers.hpp>
|
||||
|
|
|
@ -188,5 +188,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#undef SRS_PERF_FAST_FLV_ENCODER
|
||||
#define SRS_PERF_FAST_FLV_ENCODER
|
||||
|
||||
// Whether set SO_KEEPALIVE for TCP connection.
|
||||
// @see https://github.com/ossrs/srs/issues/1044
|
||||
#undef SRS_PERF_SO_KEEPALIVE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue