Affects Version/s: 2.3
Fix Version/s: 2.4
Tested on ubuntu 14.04, with java:
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
- Steps to reproduce:
run this code
with this config
where 192.168.12.8 is a host that actually exist (it can be pinged), but nothing is listening on this port.
(for some reason I don't completely understand, the host must not be localhost; otherwise we correctly get the expected behavior)
- Expected result:
- log4j2 gives up trying to connect to the server after the specified timeout (here: 100ms)
- the program prints "Done" on the console, and exits
- Actual result: the program doesn't print anything, and hangs forever.
A thread dump shows
- potential fix:
With the following patch, I get the expected result, along with a logged "Error writing to TCP:192.168.12.8:12201 socket not available":