Fix default ping_timeout config value
This commit is contained in:
@@ -188,7 +188,9 @@ void parse_file(const char *file) {
|
|||||||
int_between_f(vars, "ping_timeout", to, {
|
int_between_f(vars, "ping_timeout", to, {
|
||||||
-1, std::numeric_limits<int>::max()
|
-1, std::numeric_limits<int>::max()
|
||||||
});
|
});
|
||||||
|
if(to == -1) {
|
||||||
stream.ping_timeout = std::chrono::milliseconds(to);
|
stream.ping_timeout = std::chrono::milliseconds(to);
|
||||||
|
}
|
||||||
|
|
||||||
int_between_f(vars, "channels", stream.channels, {
|
int_between_f(vars, "channels", stream.channels, {
|
||||||
1, std::numeric_limits<int>::max()
|
1, std::numeric_limits<int>::max()
|
||||||
|
|||||||
+2
-3
@@ -262,10 +262,9 @@ void control_server_t::iterate(std::chrono::milliseconds timeout) {
|
|||||||
{
|
{
|
||||||
net::packet_t packet { event.packet };
|
net::packet_t packet { event.packet };
|
||||||
|
|
||||||
std::uint16_t *type = (std::uint16_t *)packet->data;
|
auto type = (std::uint16_t *)packet->data;
|
||||||
std::string_view payload { (char*)packet->data + sizeof(*type), packet->dataLength - sizeof(*type) };
|
std::string_view payload { (char*)packet->data + sizeof(*type), packet->dataLength - sizeof(*type) };
|
||||||
|
|
||||||
|
|
||||||
auto cb = _map_type_cb.find(*type);
|
auto cb = _map_type_cb.find(*type);
|
||||||
if(cb == std::end(_map_type_cb)) {
|
if(cb == std::end(_map_type_cb)) {
|
||||||
BOOST_LOG(warning)
|
BOOST_LOG(warning)
|
||||||
@@ -424,7 +423,7 @@ void controlBroadcastThread(safe::signal_t *shutdown_event, control_server_t *se
|
|||||||
});
|
});
|
||||||
|
|
||||||
server->map(packetTypes[IDX_INVALIDATE_REF_FRAMES], [&](session_t *session, const std::string_view &payload) {
|
server->map(packetTypes[IDX_INVALIDATE_REF_FRAMES], [&](session_t *session, const std::string_view &payload) {
|
||||||
std::int64_t *frames = (std::int64_t *)payload.data();
|
auto frames = (std::int64_t *)payload.data();
|
||||||
auto firstFrame = frames[0];
|
auto firstFrame = frames[0];
|
||||||
auto lastFrame = frames[1];
|
auto lastFrame = frames[1];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user