-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Hi,
I have a new user for https://github.com/berthubert/bagconv and they are trying to send loads of queries to my cpp-httplib powered server, and getting timeouts.
I'm still investigating exactly what is going on, but I wonder what this is doing in keep_alive:
std::this_thread::sleep_for(microseconds{interval_usec});There is already a call to select/poll that will sleep for interval_usec. What does this add, except latency for clients?
I'm also a bit confused why this has to loop so quickly, is this to catch a change in svr_sock to INVALID_SOCKET?
I've removed the sleep_for locally and things appear to be snappier now, and I don't see any problems. But perhaps I am missing something!
Bert
Metadata
Metadata
Assignees
Labels
No labels