Merge pull request #1922 from lbryio/supress_invalid_token_error_to_debug

supress invalid token error to debug
This commit is contained in:
Jack Robison 2019-02-15 15:19:58 -05:00 committed by GitHub
commit dba4a09d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -480,7 +480,9 @@ class KademliaProtocol(DatagramProtocol):
f"Error sending '{request.method}' to {peer.address}:{peer.udp_port}\n" \
f"Args: {request.args}\n" \
f"Raised: {str(remote_exception)}"
if error_datagram.response not in old_protocol_errors:
if 'Invalid token' in error_msg:
log.debug(error_msg)
elif error_datagram.response not in old_protocol_errors:
log.warning(error_msg)
else:
log.warning("known dht protocol backwards compatibility error with %s:%i (lbrynet v%s)",