Enhanced multithreade connection model with thread-safe windows and
dynamic timeouts