Rather than hardcoding the timeout (3 seconds), seems like a good idea to make this parameter configurable depending on the client needs.