From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 9 Dec 2018 15:57:47 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 02/11] sio: treat EADDRINUSE in sio_listen as error Message-ID: <20181209125747.k5hql2qfnchnhjvr@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org List-ID: 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.