UDPStream::UDPStream(const sockaddr_in6 &dst, uint32_t pacing_rate, int ttl, int multicast_iface_index)
: dst(dst)
{
- sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
+ sock = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP);
if (sock == -1) {
// Oops. Ignore this output, then.
log_perror("socket");