- if(sendto(write_fd, packet->data, packet->len, 0, &request.sock, sizeof request.sock) < 0) {
- logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device,
- strerror(errno));
- running = false;
+ if(write(write_fd, packet->data, packet->len) < 0) {
+ if(errno != EINTR && errno != EAGAIN) {
+ logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, strerror(errno));
+ running = false;
+ }
+