def safe_finish(self):
        try:
            self.finish()
        except (socket.error, IOError):
            # We don't want to raise IOError exception if finish() call fails.
            # It can happen if connection is set to Keep-Alive, but client
            # closes connection after receiving response.
            logging.debug('Ignoring IOError in safe_finish()')
            pass
Finish session. If it will blow up - connection was set to Keep-Alive and
dataset/ETHPy150Open benoitc/gaffer/gaffer/sockjs/basehandler.py/BaseHandler.safe_finish