From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 7 Dec 2018 20:37:30 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] [PATCH 2/4] iproto: fire on_disconnect right after disconnect Message-ID: <20181207173730.GD840@chai> References: <0fd1142f244d285cf74a8e2045f182ade4694020.1544197465.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0fd1142f244d285cf74a8e2045f182ade4694020.1544197465.git.v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: * Vladislav Shpilevoy [18/12/07 18:48]: > Before the patch on_disconnect triggers were called > only after last outstanding request had finished. It > was enough for most goals. But after box.session.push > was implemented, it appeared that it is impossible to > return an error from push() if a connection is closed. > > Tx session just does not know that a connection is > already closed. The patch splits destroy and > disconnect phases of an iproto connection lifecycle. > Disconnect calls on_disconnect triggers and resets > iproto socket fd. Destroy frees resources. OK to push. > Needed for #3859 -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov