def reset(self):
def fail(metadata):<EOL><INDENT>raise ProtocolError("<STR_LIT>" % metadata)<EOL><DEDENT>log_debug("<STR_LIT>", self.local_port)<EOL>self._append(b"<STR_LIT>", response=Response(self, on_failure=fail))<EOL>self.sync()<EOL>
Add a RESET message to the outgoing queue, send
        it and consume all remaining messages.