From b5b4812a32fde6d747cd76b49b1b7b28a1244093 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Tue, 25 Apr 2023 15:55:21 -0600 Subject: [PATCH] Check for nil in response to PerformJoin --- federationapi/internal/perform.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/federationapi/internal/perform.go b/federationapi/internal/perform.go index 1eeae380f..1cfc427cf 100644 --- a/federationapi/internal/perform.go +++ b/federationapi/internal/perform.go @@ -172,6 +172,9 @@ func (r *FederationInternalAPI) performJoinUsingServer( return err } r.statistics.ForServer(serverName).Success(statistics.SendDirect) + if response == nil { + return fmt.Errorf("Received nil response from gomatrixserverlib.PerformJoin") + } // We need to immediately update our list of joined hosts for this room now as we are technically // joined. We must do this synchronously: we cannot rely on the roomserver output events as they