Skip to content

Commit bb9282a

Browse files
committed
Don't trap errors on sendto, these aren't necessarily fatal
1 parent 3e8a16d commit bb9282a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/zbeacon.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,11 @@ s_beacon_send (agent_t *self)
758758
(char *) zframe_data (self->transmit), zframe_size (self->transmit),
759759
0, // Flags
760760
(struct sockaddr *) &self->broadcast, sizeof (inaddr_t));
761-
if (size == SOCKET_ERROR)
762-
s_handle_io_error ("sendto");
761+
// Sending can fail if the OS is blocking multicast. In such cases we
762+
// don't try to report the error. We might log this or send to an error
763+
// console at some point.
764+
if (size == SOCKET_ERROR)
765+
/* s_handle_io_error ("sendto") */ ;
763766
}
764767

765768
// Destroy agent instance

0 commit comments

Comments
 (0)