- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.5k
 
Description
I'm using httplib during tests of a client application in order to verify the requests that are made, which works great so far (thanks!).
However, I'm running into a performance problem: for each test case, I'm creating a new Server, listen for requests (on a separate thread), and stop the server (and join the thread) after the test finished. The problem is that the listen call only returns after ~100ms, which is caused by the 100000 usec timeout of select_read (inside the listen_internal method). If I change this timeout to 0, my tests finish in 5ms instead of 105ms (multiplied by the number of test cases, which quickly adds up).
It would be great if we could configure the timeout or completely disable the select call. Maybe it even makes sense to set this value to 0 automatically when the stop method is called? I don't know much about the effects of this, but from my understanding, when I ask the server to stop, it should stop as fast as possible and not wait for some timeouts on sockets.