Closed tsunghanliu closed 7 years ago
This is an unfixable problem without a rewrite of the network layer. Spinning on write means that the (time-critical) sample processing is stalled and nothing progresses until the network client decides to accept the data. This is why the internal webserver is disabled. Just use an external webserver.
When using the built-in webserver, I met an issue that some large files are not downloaded correctly. (e.g. ol3/ol-3.17.1.js) Because the socket is set to non-blocking mode and the system buffer can't be larger than /proc/sys/net/core/wmem_max. The errno will be EAGAIN or EWOULDBLOCK when this issue happens.
This PR tries to send/recv data again when getting this kind of errors.