- if (gnutls_record_check_pending (ctx->session)
- || select_fd (fd, 0, WAIT_FOR_READ))
- ret = gnutls_record_recv (ctx->session, buf + offset, bufsize - offset);
- }
- while (ret == GNUTLS_E_INTERRUPTED);
+ do
+ {
+ if (gnutls_record_check_pending (ctx->session)
+ || select_fd (fd, 0, WAIT_FOR_READ))
+ ret = gnutls_record_recv (ctx->session, buf + offset,
+ bufsize - offset);
+ }
+ while (ret == GNUTLS_E_INTERRUPTED);