Example #1
0
 def raise_zombie(self, pre_command=None):
     connection_closed = self.h2_connection.state_machine.state == h2.connection.ConnectionState.CLOSED
     if self.zombie is not None or not hasattr(self.server_conn,
                                               'h2') or connection_closed:
         if pre_command is not None:
             pre_command()
         raise exceptions.Http2ZombieException("Connection already dead")
Example #2
0
 def raise_zombie(self, pre_command=None):  # pragma: no cover
     connection_closed = self.h2_connection.state_machine.state == h2.connection.ConnectionState.CLOSED
     if self.zombie is not None or connection_closed:
         if pre_command is not None:
             pre_command()
         raise exceptions.Http2ZombieException(
             "Connection or stream already dead: {}, {}".format(self.zombie, connection_closed))