Fix passing the error message to ban_peer_bad_protocol

This commit is contained in:
xdustinface 2022-12-05 07:37:36 +01:00
parent c356fe0465
commit cd2589620e
No known key found for this signature in database
GPG Key ID: 898EFE87B8C575DB

View File

@ -364,7 +364,7 @@ class WSChiaConnection:
# peer protocol violation
error_message = f"WSConnection.invoke sent message {sent_message_type.name} "
f"but received {recv_message_type.name}"
await self.ban_peer_bad_protocol(self.error_message)
await self.ban_peer_bad_protocol(error_message)
raise ProtocolError(Err.INVALID_PROTOCOL_MESSAGE, [error_message])
recv_method = getattr(class_for_type(self.local_type), recv_message_type.name)