]> git.ipfire.org Git - thirdparty/pdns.git/commit
Be consistent in the usage of timeout in the remote backend's httpconnector. 2776/head
authorPatrick Cloke <clokep@patrick.cloke.us>
Fri, 2 Oct 2015 18:55:49 +0000 (14:55 -0400)
committerPatrick Cloke <clokep@patrick.cloke.us>
Fri, 2 Oct 2015 19:33:05 +0000 (15:33 -0400)
commit44bde05323f82e5ffef2e5f28b13d93576e7fa50
tree00439a0839c87fa3e267c19783adc472859498f3
parentc65db8c5b14b1ae81412f5c481204921e91a5e0a
Be consistent in the usage of timeout in the remote backend's httpconnector.

The `timeout` configuration option for the remotebackend is provided in
milliseconds in the httpconnector, this is immediately converted (and stored)
as seconds.

For all write operations, the `timeout` is used without modification, however
the read operation in `recv_message` again divides the `timeout` by 1000.
This is inconsistent with the usage of `time`, which returns seconds since
the UNIX epoch.

The bug created by this is that HTTP requests from the remotebackend must be
responded to extremely quickly (practically instantaneously with the default
2 second timeout).

After this change the same timeout is used appropriately for both read and
write.
modules/remotebackend/httpconnector.cc