RTC: Change SO_REUSEPORT fail to warning. 3.0.142

pull/1978/head
winlin 4 years ago
parent 18192f7efb
commit 63b5c51748

@ -149,6 +149,7 @@ For previous versions, please read:
## V3 changes ## V3 changes
* v3.0, 2020-09-10, RTC: Change SO_REUSEPORT fail to warning. 3.0.142
* <strong>v3.0, 2020-06-27, [3.0 release0(3.0.141)][r3.0r0] released. 122674 lines.</strong> * <strong>v3.0, 2020-06-27, [3.0 release0(3.0.141)][r3.0r0] released. 122674 lines.</strong>
* v3.0, 2020-03-30, For [#1672][bug #1672], fix dvr close file failed bug. 3.0.140 * v3.0, 2020-03-30, For [#1672][bug #1672], fix dvr close file failed bug. 3.0.140
* <strong>v3.0, 2020-03-29, [3.0 beta4(3.0.139)][r3.0b4] released. 122674 lines.</strong> * <strong>v3.0, 2020-03-29, [3.0 beta4(3.0.139)][r3.0b4] released. 122674 lines.</strong>

@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION3_HPP #ifndef SRS_CORE_VERSION3_HPP
#define SRS_CORE_VERSION3_HPP #define SRS_CORE_VERSION3_HPP
#define SRS_VERSION3_REVISION 141 #define SRS_VERSION3_REVISION 142
#endif #endif

@ -115,12 +115,7 @@ srs_error_t srs_fd_reuseport(int fd)
#if defined(SO_REUSEPORT) #if defined(SO_REUSEPORT)
int v = 1; int v = 1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &v, sizeof(int)) == -1) { if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &v, sizeof(int)) == -1) {
#ifdef SRS_AUTO_CROSSBUILD srs_warn("SO_REUSEPORT failed for fd=%d", fd);
srs_warn("SO_REUSEPORT disabled for crossbuild");
return srs_success;
#else
return srs_error_new(ERROR_SOCKET_SETREUSEADDR, "SO_REUSEPORT fd=%v", fd);
#endif
} }
#else #else
#warning "SO_REUSEPORT is not supported by your OS" #warning "SO_REUSEPORT is not supported by your OS"

Loading…
Cancel
Save