From 1802b60f81e631af52ebaf939029d1a55aa4908d Mon Sep 17 00:00:00 2001 From: Gauthier Monserand Date: Mon, 4 Sep 2017 17:10:44 +0200 Subject: [PATCH] Fix socket overload with ruby ruby use SOCK_STREAM | SOCK_CLOEXEC --- trickle-overload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trickle-overload.c b/trickle-overload.c index 0b0ca18..294a383 100644 --- a/trickle-overload.c +++ b/trickle-overload.c @@ -325,7 +325,7 @@ socket(int domain, int type, int protocol) domain, type, protocol, sock); #endif /* DEBUG */ - if (sock != -1 && domain == AF_INET && type == SOCK_STREAM) { + if (sock != -1 && domain == AF_INET && type & SOCK_STREAM) { if ((sd = calloc(1, sizeof(*sd))) == NULL) return (-1); trickle_lock();