BUG/MINOR: ring: Properly parse connect timeout

The connect timeout in a ring section was not properly parsed. Thus, it was
never set and the server timeout may be overwritten, depending on the
directives order. The first char of the keyword must be tested, not the
third one.

This patch is related to the issue #1900. But it does not fix the issue. It
must be backported as far as 2.4.
This commit is contained in:
Christopher Faulet 2022-10-19 16:26:21 +02:00
parent cc640e851a
commit 321d100cc8

View File

@ -994,7 +994,7 @@ int cfg_parse_ring(const char *file, int linenum, char **args, int kwm)
err_code |= ERR_ALERT | ERR_FATAL;
goto err;
}
if (args[1][2] == 'c')
if (args[1][0] == 'c')
cfg_sink->forward_px->timeout.connect = tout;
else
cfg_sink->forward_px->timeout.server = tout;