From 3e49b0ec66ed66fc527b720b45cfc77a7e6b0e2f Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Thu, 6 Jun 2019 21:40:44 +0100 Subject: [PATCH] infohash may be null --- .../main/groovy/com/muwire/core/connection/Connection.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy index 59cd9a09..9621d4d7 100644 --- a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy @@ -127,7 +127,8 @@ abstract class Connection implements Closeable { query.uuid = e.searchEvent.getUuid() query.firstHop = e.firstHop query.keywords = e.searchEvent.getSearchTerms() - query.infohash = Base64.encode(e.searchEvent.searchHash) + if (e.searchEvent.searchHash != null) + query.infohash = Base64.encode(e.searchEvent.searchHash) query.replyTo = e.replyTo.toBase64() if (e.originator != null) query.originator = e.originator.toBase64()