From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 7 Dec 2018 20:35:41 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] [PATCH 0/4] Outdate disconnected session Message-ID: <20181207173541.GB840@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: * Vladislav Shpilevoy [18/12/07 18:48]: > Once a connection is closed, a long-running user request can not > learn about this occasion. Even box.sesion.push() still works and > on_disconnect triggers are not run. > > This patch makes things simpler: > > * disconnected session is marked as dead. So a user can determine > if a connection is closed by looking at session type == 'dead', > or checking for errors from box.session.push(); 'dead' is not a session type, it's session state. Please add a separate method for this purpose, and not abuse the type. > > * on_disconnect triggers are run right after disconnect. Even if > there are some active requests. This is an incompatible change. But people have been actually complaining in the chat that disconnect triggers are only run after all messages are processed. So a good one. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov