)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"df70e25950620dea7ddf999ddbf9f01ed75d5721","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Graceful shutdown WSGI server"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, killing a nova-api will immediacy stop WSGI service which"},{"line_number":10,"context_line":"interrupts in-process request. This will cause problem when do upgrading."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The patch do two thing:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da9b358b_cc4bd3af","line":9,"updated":"2015-03-30 13:06:37.000000000","message":"s/immediacy/immediately/","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"7d2415a92408b3b1562aa1289d160fd07ca3dd2f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Graceful shutdown WSGI server"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, killing a nova-api will immediacy stop WSGI service which"},{"line_number":10,"context_line":"interrupts in-process request. This will cause problem when do upgrading."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The patch do two thing:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da9b358b_8bc7e811","line":9,"in_reply_to":"da9b358b_cc4bd3af","updated":"2015-03-30 16:49:33.000000000","message":"Done","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"}],"nova/openstack/common/service.py":[{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"b52deb149a3a716b2a2380fd564a06d937dab72f","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        rfd, self.writepipe \u003d os.pipe()"},{"line_number":214,"context_line":"        self.readpipe \u003d eventlet.greenio.GreenPipe(rfd, \u0027r\u0027)"},{"line_number":215,"context_line":"        self.handle_signal()"},{"line_number":216,"context_line":"        self.servers \u003d []"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def handle_signal(self):"},{"line_number":219,"context_line":"        _set_signals_handler(self._handle_signal)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6ced46_9c01b408","line":216,"updated":"2015-03-25 15:12:02.000000000","message":"Please look at this review https://review.openstack.org/#/c/165104/4/openstack/common/service.py\nI think we don\u0027t need additional member self.servers, we can use self.children","commit_id":"740ec258e93b5e9a1a3990c922b16225c14cd05a"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"b52deb149a3a716b2a2380fd564a06d937dab72f","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"                for pid in self.children:"},{"line_number":398,"context_line":"                    os.kill(pid, signal.SIGHUP)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"                self.running \u003d True"},{"line_number":401,"context_line":"                self.sigcaught \u003d None"},{"line_number":402,"context_line":"        except eventlet.greenlet.GreenletExit:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6ced46_3f227252","line":399,"updated":"2015-03-25 15:12:02.000000000","message":"Blank line","commit_id":"740ec258e93b5e9a1a3990c922b16225c14cd05a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"df70e25950620dea7ddf999ddbf9f01ed75d5721","unresolved":false,"context_lines":[{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        LOG.info(_LI(\"Stop master services.\"))"},{"line_number":414,"context_line":"        # NOTE(gtt): Stop service in master process to close sockets."},{"line_number":415,"context_line":"        # See LP#1382390 for detail."},{"line_number":416,"context_line":"        for service in set("},{"line_number":417,"context_line":"                [wrap.service for wrap in self.children.values()]):"},{"line_number":418,"context_line":"            service.stop()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_0cae5b2e","line":415,"updated":"2015-03-30 13:06:37.000000000","message":"The below is not stopping the master service. It\u0027s stopping the child services.","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"7d2415a92408b3b1562aa1289d160fd07ca3dd2f","unresolved":false,"context_lines":[{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        LOG.info(_LI(\"Stop master services.\"))"},{"line_number":414,"context_line":"        # NOTE(gtt): Stop service in master process to close sockets."},{"line_number":415,"context_line":"        # See LP#1382390 for detail."},{"line_number":416,"context_line":"        for service in set("},{"line_number":417,"context_line":"                [wrap.service for wrap in self.children.values()]):"},{"line_number":418,"context_line":"            service.stop()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_ebc1d481","line":415,"in_reply_to":"da9b358b_0cae5b2e","updated":"2015-03-30 16:49:33.000000000","message":"There are self.stop() calls in child and in parent processes. Are you agree with message \"Stop services\"?","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"df70e25950620dea7ddf999ddbf9f01ed75d5721","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                [wrap.service for wrap in self.children.values()]):"},{"line_number":418,"context_line":"            service.stop()"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        LOG.info(_LI(\"Killing children.\"))"},{"line_number":421,"context_line":"        for pid in self.children:"},{"line_number":422,"context_line":"            try:"},{"line_number":423,"context_line":"                os.kill(pid, signal.SIGTERM)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_8c9a6b13","line":420,"updated":"2015-03-30 13:06:37.000000000","message":"This and the above LOG messages should be DEBUG level, not INFO, as they do not represent a complete unit of work. It would be good to have INFO level log messages written *after* the children are successfully killed and after the master service pid is killed, though.","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"7d2415a92408b3b1562aa1289d160fd07ca3dd2f","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                [wrap.service for wrap in self.children.values()]):"},{"line_number":418,"context_line":"            service.stop()"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        LOG.info(_LI(\"Killing children.\"))"},{"line_number":421,"context_line":"        for pid in self.children:"},{"line_number":422,"context_line":"            try:"},{"line_number":423,"context_line":"                os.kill(pid, signal.SIGTERM)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_0bdcf8e2","line":420,"in_reply_to":"da9b358b_8c9a6b13","updated":"2015-03-30 16:49:33.000000000","message":"Done","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"41ea432f9523a57ffffae7eec19aac317ee01d63","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        self.tg.wait()"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def restart(self):"},{"line_number":482,"context_line":"        self.stop()"},{"line_number":483,"context_line":"        self.done \u003d event.Event()"},{"line_number":484,"context_line":"        for restart_service in self.services:"},{"line_number":485,"context_line":"            restart_service.reset()"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9b358b_6e6ef130","side":"PARENT","line":482,"updated":"2015-03-30 17:15:56.000000000","message":"I don\u0027t understand why we need to start/reset/stop here. I think that service can manage it in reset implementation.","commit_id":"31dfcac6105751f6857215c4a89869d5a779a2fd"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6dacb12d00bc837ab2ebc0eb26880c9c0f566cd2","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        self.tg.wait()"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def restart(self):"},{"line_number":482,"context_line":"        self.stop()"},{"line_number":483,"context_line":"        self.done \u003d event.Event()"},{"line_number":484,"context_line":"        for restart_service in self.services:"},{"line_number":485,"context_line":"            restart_service.reset()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aca2d91_55775f02","side":"PARENT","line":482,"updated":"2015-05-06 08:57:56.000000000","message":"why is this changed?","commit_id":"31dfcac6105751f6857215c4a89869d5a779a2fd"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"8c6382ce551ef9679b183a65d7845c587860e157","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        self.tg.wait()"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def restart(self):"},{"line_number":482,"context_line":"        self.stop()"},{"line_number":483,"context_line":"        self.done \u003d event.Event()"},{"line_number":484,"context_line":"        for restart_service in self.services:"},{"line_number":485,"context_line":"            restart_service.reset()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aca2d91_e715589b","side":"PARENT","line":482,"in_reply_to":"1aca2d91_55775f02","updated":"2015-05-07 18:09:33.000000000","message":"Method Services.stop() calls nova/wsgi.Server.stop() method which closes socket descriptors. If we close socket descriptors here there is no possibility to \u0027recover\u0027 it in start() method(I mean to bind new socket with this address and port).\nClassic socket allows to use option SO_REUSEPORT to be able to bind socket with address/port that is already bound with another socket.\nBut to create socket and start listen we use eventlet.listen() method and there is no ability to set this socket option here. Setting socket\u0027s option SO_REUSEPORT after eventlet.listen() has no effect.\nSo we can not close socket if we can not \u0027recover\u0027 it later.\n\nMethod Services.restart() is used for reloading configuration of service and I think that service\u0027s method reset() can take care of this functionality, so we don\u0027t need to do additional stop/start of service.","commit_id":"31dfcac6105751f6857215c4a89869d5a779a2fd"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6b7f6753480fd370786bba8fceaaaf03eff5034d","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    def restart(self):"},{"line_number":487,"context_line":"        self.stop()"},{"line_number":488,"context_line":"        self.done \u003d event.Event()"},{"line_number":489,"context_line":"        for restart_service in self.services:"},{"line_number":490,"context_line":"            restart_service.reset()"},{"line_number":491,"context_line":"            self.tg.add_thread(self.run_service, restart_service, self.done)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_8418d776","side":"PARENT","line":488,"updated":"2015-05-27 14:50:07.000000000","message":"I was going to add a comment this will probably break other methods, which use self.done, but it turns out another Event instance is created in __init__(). I wonder how this worked before.\n\nSo we no longer need to run new threads in restart()?","commit_id":"d47a8355d17648d216dc5e72e420695dfcbb3fe2"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"7a3a46f3e78190cc4346ace6566056caace1f177","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    def restart(self):"},{"line_number":487,"context_line":"        self.stop()"},{"line_number":488,"context_line":"        self.done \u003d event.Event()"},{"line_number":489,"context_line":"        for restart_service in self.services:"},{"line_number":490,"context_line":"            restart_service.reset()"},{"line_number":491,"context_line":"            self.tg.add_thread(self.run_service, restart_service, self.done)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_90057c7b","side":"PARENT","line":488,"in_reply_to":"7a016987_8418d776","updated":"2015-05-28 18:37:03.000000000","message":"My understanding is that thread with started service is waiting(line 503) for event (line 478). When event is sent thread is finished. And docs tell us:\n    \"It is an error to call send() multiple times on the same event.\"\n    ...\n    \"Use reset() between send() s to reuse an event object.\"\nBut in eventlet source code(https://github.com/simplegeo/eventlet/blob/master/eventlet/event.py#[L48-51]) we can find:\n\"    def reset(self):\n        # this is kind of a misfeature and doesn\u0027t work perfectly well,\n        # it\u0027s better to create a new event rather than reset an old one\n        # removing documentation so that we don\u0027t get new use cases for it\"\nSo here for reseting event we create new one.","commit_id":"d47a8355d17648d216dc5e72e420695dfcbb3fe2"}],"nova/wsgi.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"d2db10b65ee808958a79c4f4faff905ff6dfb9c9","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            # Resize pool to stop new requests from being processed"},{"line_number":245,"context_line":"            self._pool.resize(0)"},{"line_number":246,"context_line":"            num \u003d self._pool.running()"},{"line_number":247,"context_line":"            LOG.info(_(\"Waiting WSGI server to finish %d requests.\" % num))"},{"line_number":248,"context_line":"            self._pool.waitall()"},{"line_number":249,"context_line":"            self._server.kill()"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_becc5736","line":247,"updated":"2014-10-17 10:53:05.000000000","message":"H702  Formatting operation should be outside of localization method call\n\nand please use `LOG.info(_LI`","commit_id":"926ce184db2ac7883848e3207dc78d50f448bbba"},{"author":{"_account_id":1678,"name":"Tiantian Gao","email":"gtt116@gmail.com","username":"gtt116"},"change_message_id":"63c017f9ec12f5c569ae2191dfd0866c5b44ebb0","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            # Resize pool to stop new requests from being processed"},{"line_number":245,"context_line":"            self._pool.resize(0)"},{"line_number":246,"context_line":"            num \u003d self._pool.running()"},{"line_number":247,"context_line":"            LOG.info(_(\"Waiting WSGI server to finish %d requests.\" % num))"},{"line_number":248,"context_line":"            self._pool.waitall()"},{"line_number":249,"context_line":"            self._server.kill()"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_59d9c520","line":247,"in_reply_to":"baa201ad_becc5736","updated":"2014-10-17 11:22:58.000000000","message":"H702 fixed. Thanks.\n\nAs line 241, it was LOG.info(_(\"\")). I think it should be consistent with the other LOG sentences in this file.","commit_id":"926ce184db2ac7883848e3207dc78d50f448bbba"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"05ff24cc943aef903951c68f00a14ab9b71542a3","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            # Resize pool to stop new requests from being processed"},{"line_number":245,"context_line":"            self._pool.resize(0)"},{"line_number":246,"context_line":"            num \u003d self._pool.running()"},{"line_number":247,"context_line":"            LOG.info(_(\"Waiting WSGI server to finish %d requests.\", num))"},{"line_number":248,"context_line":"            self._pool.waitall()"},{"line_number":249,"context_line":"            self._server.kill()"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_84e02427","line":247,"range":{"start_line":247,"start_character":12,"end_line":247,"end_character":23},"updated":"2014-10-17 11:51:48.000000000","message":"LOG.info should be with translation `_LI`. Please change it.","commit_id":"3a69c272822aa871a2d5ee83045e3e30a23d3be6"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"58ea92e2dbf148a75b93ce0e3c77e6da19d40c6f","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            # Resize pool to stop new requests from being processed"},{"line_number":245,"context_line":"            self._pool.resize(0)"},{"line_number":246,"context_line":"            num \u003d self._pool.running()"},{"line_number":247,"context_line":"            LOG.info(_(\"Waiting WSGI server to finish %d requests.\", num))"},{"line_number":248,"context_line":"            self._pool.waitall()"},{"line_number":249,"context_line":"            self._server.kill()"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_31009565","line":247,"range":{"start_line":247,"start_character":12,"end_line":247,"end_character":23},"in_reply_to":"baa201ad_84e02427","updated":"2014-10-17 13:51:50.000000000","message":"And it should be -\u003e \n    LOG.info(_LE(\"Waiting WSGI server to finish %d requests.\"), num)","commit_id":"3a69c272822aa871a2d5ee83045e3e30a23d3be6"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"b52deb149a3a716b2a2380fd564a06d937dab72f","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        if hasattr(self, \u0027_dup_socket\u0027):"},{"line_number":249,"context_line":"            LOG.info(_LI(\"Closing dup socket.\"))"},{"line_number":250,"context_line":"            self._dup_socket.close()"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        if self._server is not None:"},{"line_number":253,"context_line":"            # Resize pool to stop new requests from being processed"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6ced46_32b2a994","line":250,"updated":"2015-03-25 15:12:02.000000000","message":"Is it correct to close socket here?\nI believe we can lose some response, isn\u0027t it?\nI believe green threads can still work with this socket.","commit_id":"740ec258e93b5e9a1a3990c922b16225c14cd05a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"df70e25950620dea7ddf999ddbf9f01ed75d5721","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if hasattr(socket, \u0027TCP_KEEPIDLE\u0027):"},{"line_number":171,"context_line":"            self.dup_socket.setsockopt(socket.IPPROTO_TCP,"},{"line_number":172,"context_line":"                                       socket.TCP_KEEPIDLE,"},{"line_number":173,"context_line":"                                       CONF.tcp_keepidle)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if self._use_ssl:"},{"line_number":176,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_4c17c351","line":173,"updated":"2015-03-30 13:06:37.000000000","message":"Instead of changing all of the above lines, you could have just added a line here:\n\n self.dup_socket \u003d dup_socket","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"df70e25950620dea7ddf999ddbf9f01ed75d5721","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            # Resize pool to stop new requests from being processed"},{"line_number":264,"context_line":"            self._pool.resize(0)"},{"line_number":265,"context_line":"            num \u003d self._pool.running()"},{"line_number":266,"context_line":"            LOG.info(_LI(\"Waiting WSGI server to finish %d requests.\"), num)"},{"line_number":267,"context_line":"            self._pool.waitall()"},{"line_number":268,"context_line":"            self._server.kill()"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_ac31af0d","line":266,"updated":"2015-03-30 13:06:37.000000000","message":"Same comment about the LOG INFO messages that should be DEBUG... :(","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"7d2415a92408b3b1562aa1289d160fd07ca3dd2f","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            # Resize pool to stop new requests from being processed"},{"line_number":264,"context_line":"            self._pool.resize(0)"},{"line_number":265,"context_line":"            num \u003d self._pool.running()"},{"line_number":266,"context_line":"            LOG.info(_LI(\"Waiting WSGI server to finish %d requests.\"), num)"},{"line_number":267,"context_line":"            self._pool.waitall()"},{"line_number":268,"context_line":"            self._server.kill()"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da9b358b_ebd8b4f1","line":266,"in_reply_to":"da9b358b_ac31af0d","updated":"2015-03-30 16:49:33.000000000","message":"Done","commit_id":"102ade5e2e316ee6b6338a00ef068ef99ca6cc9f"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6b7f6753480fd370786bba8fceaaaf03eff5034d","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        if self._server is not None:"},{"line_number":257,"context_line":"            # let eventlet close socket"},{"line_number":258,"context_line":"            self._server.kill()"},{"line_number":259,"context_line":"        else:"},{"line_number":260,"context_line":"            # master process close opened process"},{"line_number":261,"context_line":"            self._socket.close()"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_29e8de7b","line":259,"updated":"2015-05-27 14:50:07.000000000","message":"I wonder why it differs for master/child processes here: isn\u0027t there self._server in the context of the master process? won\u0027t self._server.kill() close the socket as well?","commit_id":"90590de1a3316c4644db10d2301275c9fdb33b7b"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"7a3a46f3e78190cc4346ace6566056caace1f177","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        if self._server is not None:"},{"line_number":257,"context_line":"            # let eventlet close socket"},{"line_number":258,"context_line":"            self._server.kill()"},{"line_number":259,"context_line":"        else:"},{"line_number":260,"context_line":"            # master process close opened process"},{"line_number":261,"context_line":"            self._socket.close()"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_2bb659f9","line":259,"in_reply_to":"7a016987_29e8de7b","updated":"2015-05-28 18:37:03.000000000","message":"In master process method start() is newer called. That\u0027s why self._server is None. _socket is created in __init__ that\u0027s why we should close it in master process. Also master process doesn\u0027t have dup_socket because it is duplicated in start method. So calling self._socket.close() is enough for master. Children have 2 file descriptors pointed to the same socket. \nself._socket is closed by eventlet and self.dup_socket should be closed in code above.\nAnd after all FDs are closed socket will be marked as closed.","commit_id":"90590de1a3316c4644db10d2301275c9fdb33b7b"}]}
