diff options
author | Tom Lee <github@tomlee.co> | 2015-11-18 00:36:29 -0800 |
---|---|---|
committer | Tom Lee <github@tomlee.co> | 2015-11-18 00:36:29 -0800 |
commit | d4b715f0aa97bae7bf2f6ebfe4837f39c0451e84 (patch) | |
tree | c818019583e1c1c6da7cee6fb1c1fa4e3e1758d7 /dict.c | |
parent | db1c46dac7f0c54310e05a682cc444b7ae287dcf (diff) |
Fix potential race in 'invalid timeout' tests
It's possible for the call to connect() to succeed on the very first
try, in which case the logic for checking for invalid timeout fields is
never executed. When this happens, the tests fail because they expect a
REDIS_ERR_IO but no such failure has occurred.
Tests aside, this is a potential source of irritating and hard-to-find
intermittent bugs.
This patch forces the validation to occur early so that we get
predictable behavior whenever an invalid timeout is specified.
Diffstat (limited to 'dict.c')
0 files changed, 0 insertions, 0 deletions