Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] Re: [PATCH v2 02/11] sio: treat EADDRINUSE in sio_listen as error
Date: Mon, 10 Dec 2018 18:36:31 +0300	[thread overview]
Message-ID: <4ca666c8-6a5f-5918-395f-ff5f6378cac9@tarantool.org> (raw)
In-Reply-To: <20181209125747.k5hql2qfnchnhjvr@esperanza>



On 09/12/2018 15:57, Vladimir Davydov wrote:
> On Wed, Dec 05, 2018 at 12:28:49AM +0300, Vladislav Shpilevoy wrote:
>> Earlier maybe it made sense - not to throw an error
>> on EADDRINUSE from listen(), but now it just
>> complicates exceptions removal.
>> ---
>>   src/evio.cc | 5 +----
>>   src/sio.cc  | 2 +-
>>   2 files changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/evio.cc b/src/evio.cc
>> index a6ac65daf..9df797c78 100644
>> --- a/src/evio.cc
>> +++ b/src/evio.cc
>> @@ -294,10 +294,7 @@ evio_service_listen(struct evio_service *service)
>>   		  sio_strfaddr(&service->addr, service->addr_len));
>>   
>>   	int fd = service->ev.fd;
>> -	if (sio_listen(fd)) {
>> -		/* raise for addr in use to */
>> -		tnt_raise(SocketError, sio_socketname(fd), "listen");
>> -	}
>> +	sio_listen(fd);
>>   	ev_io_start(service->loop, &service->ev);
>>   }
>>   
>> diff --git a/src/sio.cc b/src/sio.cc
>> index d79ad5c01..aa44b4912 100644
>> --- a/src/sio.cc
>> +++ b/src/sio.cc
>> @@ -213,7 +213,7 @@ int
>>   sio_listen(int fd)
>>   {
>>   	int rc = listen(fd, sio_listen_backlog());
>> -	if (rc < 0 && errno != EADDRINUSE)
>> +	if (rc < 0)
>>   		tnt_raise(SocketError, sio_socketname(fd), "listen");
>>   	return rc;
>>   }
> 
> Please squash this into the patch removing sio exceptions.
> 

Done.

  reply	other threads:[~2018-12-10 15:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 21:28 [PATCH v2 00/11] SWIM preparation Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 01/11] sio: remove unused functions Vladislav Shpilevoy
2018-12-09 12:10   ` Vladimir Davydov
2018-12-04 21:28 ` [PATCH v2 10/11] evio: make code C compatible Vladislav Shpilevoy
2018-12-05  8:56   ` Vladimir Davydov
2018-12-05 20:07     ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 11/11] evio: turn nto c Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 02/11] sio: treat EADDRINUSE in sio_listen as error Vladislav Shpilevoy
2018-12-09 12:57   ` Vladimir Davydov
2018-12-10 15:36     ` Vladislav Shpilevoy [this message]
2018-12-04 21:28 ` [PATCH v2 03/11] sio: remove exceptions Vladislav Shpilevoy
2018-12-09 12:54   ` Vladimir Davydov
2018-12-10 15:37     ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-11  8:44       ` Vladimir Davydov
2018-12-04 21:28 ` [PATCH v2 04/11] sio: make code compatible with C Vladislav Shpilevoy
2018-12-05  8:57   ` Vladimir Davydov
2018-12-05 20:07     ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 05/11] sio: turn into C Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 06/11] evio: make on_accept be nothrow Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 07/11] coio: fix double close of a file descriptor Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 08/11] evio: remove exceptions Vladislav Shpilevoy
2018-12-04 21:28 ` [PATCH v2 09/11] coio: fix file descriptor leak on accept Vladislav Shpilevoy
2018-12-11  8:47 ` [PATCH v2 00/11] SWIM preparation Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ca666c8-6a5f-5918-395f-ff5f6378cac9@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] Re: [PATCH v2 02/11] sio: treat EADDRINUSE in sio_listen as error' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox