Summary: | ajp worker's socket_connect_timeout value is handled as seconds | ||
---|---|---|---|
Product: | Tomcat Connectors | Reporter: | TaeKyung Suk <tkstone72> |
Component: | mod_jk | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.2.44 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
TaeKyung Suk
2018-09-21 07:48:12 UTC
jk_connect.c handles socket_connect_timeout value as milliseconds on Windows. <jk_connect.c> line 206, 207 tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; Thanks for your report and analysis. This was a regression in version 1.2.44 on platforms that are non-Windows and do support poll(). The following fix was committed in r1841817 and will be part of version 1.2.46: Index: native/common/jk_connect.c =================================================================== --- native/common/jk_connect.c (revision 1841810) +++ native/common/jk_connect.c (working copy) @@ -274,7 +274,7 @@ socklen_t rclen = (socklen_t)sizeof(rc); pfd.fd = sd; pfd.events = POLLOUT; - rc = poll(&pfd, 1, timeout * 1000); + rc = poll(&pfd, 1, timeout); if (rc <= 0) { /* Save errno */ int err = errno; Regards, Rainer |