Fix default ping_timeout config value

This commit is contained in:
loki
2020-03-01 14:06:47 +01:00
parent 1d6c6046a2
commit 1362abc70d
2 changed files with 6 additions and 5 deletions

View File

@@ -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()
});