mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 09:43:51 +00:00
In case we want to send a lot of data, and the receiver is slower than the sender. This will first fill up the receivers queues and after this eventually also the senders queues, until the socket is temporarily unable to accept more data to send. select_write is done with an timeout of zero, which makes the select call used always return immediately: (see http://man7.org/linux/man-pages/man2/select.2.html) This means that every marginal unavailability will make it return false for is_writable and therefore httplib will immediately abort the transfer. Therefore make this values configurable in the same way as the read timeout already is. Set the default write timeout to 5 seconds, the same default value used for the read timeout.