From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 BFE2B469710 for ; Fri, 29 May 2020 15:41:51 +0300 (MSK) Date: Fri, 29 May 2020 15:41:31 +0300 From: Alexander Turenko Message-ID: <20200529124131.lvah6pioq7zydm7k@tkn_work_nb> References: <5f4f3b47886fa74ab4c8fa19cbe77d80ed67b4b6.1589918392.git.lvasiliev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5f4f3b47886fa74ab4c8fa19cbe77d80ed67b4b6.1589918392.git.lvasiliev@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH V2] socket: fix error while closing socket.tcp_server List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Vasiliev Cc: tarantool-patches@dev.tarantool.org On Tue, May 19, 2020 at 11:05:25PM +0300, Leonid Vasiliev wrote: > The tcp server starts in a separate fiber. > When server's socket is closed from another fiber, > an exception will be thrown in server's loop from > check_socket function. > A "socket is close" check has been added at server's > fiber and now server's fiber terminates correctly. > > Fixes: #4087 > --- > https://github.com/tarantool/tarantool/issues/4087 > https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4087-fix-socket-stuff > > @Changelog fix error while closing socket.tcp_server socket(gh-4087) > > For a "socket is close" check, fd < 0 is used instead of an additional flag. LGTM.