From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 874126EC56; Fri, 19 Mar 2021 02:18:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 874126EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616109529; bh=w91OJNnEgx8XFDt2O0d0psKkmKWXi6FeOyDW4JXo7C4=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=M+G/AgZw8rvAa9A1to8C3VTAcMyiQhEe3xB9WGCuJHRR482Rnqm3mgA0xCbHBsLDp bEuSVtG6pl0sGmJxeRfWAHhTpigoqwrJUB30io7V+9wqZ6t2mQvUSpYSUjV1VR0ivV 0KYHtrREoX5UTzfW9lqMg5gMu1IfTMcPM23cSlGg= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 641726EC56 for ; Fri, 19 Mar 2021 02:18:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 641726EC56 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lN1uh-0006Ps-Sw; Fri, 19 Mar 2021 02:18:48 +0300 To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org References: Message-ID: Date: Fri, 19 Mar 2021 00:18:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96485A7A9FC13189387C0BEA1E3D4462C3647B2E1B26E9A95182A05F5380850406759663BB4D966CBB352C3D125AEF1445CBA7813B3D78CD1D2018693BA073F39 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77603ADE015AF816DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E8D1333770DC60CDEA1F7E6F0F101C67CDEEF6D7F21E0D1D174C73DBBBFC766478D1101531E55E672DF0B87AC00773DE22B9AA88FFC1B205389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C078FCF50C7EAF9C588941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6F532FBFD8162E58CCC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC374CE26A9E38610E75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4931B544F03EFBC4D57C96613F75B7D048DC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F93F060FBA3C93C613B503F486389A921A5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2BBE337FB72E923155C0AF1600DCBC20BD52826C51A2876ABD716CF42ACCA0F24 X-C1DE0DAB: 0D63561A33F958A5796514A41D5203AC8E3ADE03D681408F6950C235509A2DACD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F507C2EA0814E450DE9CD62DD100D9D0A9527613F8BB0EAC00773212F3262B39FF90E3A53B0CF0821D7E09C32AA3244C7D0FE8E530893D528FD9E516FEC677FEE8FBBEFAE1C4874C729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyKyJYJ15DtIsJx4yJT+RQQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382228D05D6A1C897A0367A6E4DAF13E9CAC3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/2] swim: add SO_BROADCAST option X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" I force updated the patch on the branch. Could you please check if it works on your machine? For example, this test: uuid = require('uuid') swim = require('swim') s = swim.new({uuid = uuid(), uri = '127.0.0.1:3313'}) s:broadcast(3313) On Mac it used to print EADDRNOTAVAIL message. Probably would fail with something on Linux too, but I don't know. Might just work fine as well. ==================== diff --git a/src/lib/swim/swim_io.c b/src/lib/swim/swim_io.c index 45df36ba4..c3fca3d7f 100644 --- a/src/lib/swim/swim_io.c +++ b/src/lib/swim/swim_io.c @@ -513,7 +513,7 @@ swim_complete_send(struct swim_scheduler *scheduler, struct swim_task *task, ssize_t size) { if (size < 0) { - bool is_critical = false; + bool is_critical = true; #if TARGET_OS_DARWIN /* * On Mac this error happens regularly if SWIM is bound to @@ -524,7 +524,7 @@ swim_complete_send(struct swim_scheduler *scheduler, struct swim_task *task, * is not supposed to be used in prod. */ struct error *last = diag_last_error(diag_get()); - is_critical = (last->saved_errno == EADDRNOTAVAIL); + is_critical = (last->saved_errno != EADDRNOTAVAIL); #endif if (is_critical) diag_log();