summaryrefslogtreecommitdiff
path: root/internal/federation/util.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-06-27 11:46:07 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-27 11:46:07 +0200
commit3e6aef00b26e33181e907c9a27357003ad497b82 (patch)
treeb67d0a97b39e54d3b24902b6b333fcc875d5a073 /internal/federation/util.go
parentremove regex hostname parsing (#67) (diff)
downloadgotosocial-3e6aef00b26e33181e907c9a27357003ad497b82.tar.xz
fix the annoying infinite handshake bug (tested) (#69)
Diffstat (limited to 'internal/federation/util.go')
-rw-r--r--internal/federation/util.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/federation/util.go b/internal/federation/util.go
index 7be92e13d..9ec0770f6 100644
--- a/internal/federation/util.go
+++ b/internal/federation/util.go
@@ -213,6 +213,8 @@ func (f *federator) AuthenticateFederatedRequest(username string, r *http.Reques
}
func (f *federator) DereferenceRemoteAccount(username string, remoteAccountID *url.URL) (typeutils.Accountable, error) {
+ f.startHandshake(username, remoteAccountID)
+ defer f.stopHandshake(username, remoteAccountID)
transport, err := f.GetTransportForUser(username)
if err != nil {