mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-28 22:13:29 +00:00
Fix default ping_timeout config value
This commit is contained in:
parent
1d6c6046a2
commit
1362abc70d
@ -188,8 +188,10 @@ void parse_file(const char *file) {
|
||||
int_between_f(vars, "ping_timeout", to, {
|
||||
-1, std::numeric_limits<int>::max()
|
||||
});
|
||||
stream.ping_timeout = std::chrono::milliseconds(to);
|
||||
|
||||
if(to == -1) {
|
||||
stream.ping_timeout = std::chrono::milliseconds(to);
|
||||
}
|
||||
|
||||
int_between_f(vars, "channels", stream.channels, {
|
||||
1, std::numeric_limits<int>::max()
|
||||
});
|
||||
|
@ -262,10 +262,9 @@ void control_server_t::iterate(std::chrono::milliseconds timeout) {
|
||||
{
|
||||
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) };
|
||||
|
||||
|
||||
auto cb = _map_type_cb.find(*type);
|
||||
if(cb == std::end(_map_type_cb)) {
|
||||
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) {
|
||||
std::int64_t *frames = (std::int64_t *)payload.data();
|
||||
auto frames = (std::int64_t *)payload.data();
|
||||
auto firstFrame = frames[0];
|
||||
auto lastFrame = frames[1];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user