* io mode for the socket
* @param timeout (r) number of seconds to try reading
*
- * @returns number of bytes actually read or -1 on fatal error
+ * @returns number of bytes actually read or -1 on timeout or error
*/
ssize_t readt(int socket, void *data, const size_t length, int setnonblocking, int timeout)
{
while ((ret = select(socket + 1, &rfds, NULL, NULL, &tv)) < 1) {
switch (ret) {
case 0:
- LOG(log_warning, logtype_afpd, "select timeout %d s", timeout);
+ LOG(log_debug, logtype_afpd, "select timeout %d s", timeout);
errno = EAGAIN;
goto exit;