From df4af1856a18d997fdd9b8d6e7b9b279a1164b58 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 3 Mar 2022 08:33:10 +0100 Subject: [PATCH] downstream: panic when registering twice This would be a soju bug. --- downstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downstream.go b/downstream.go index 2ee35f9..63940d0 100644 --- a/downstream.go +++ b/downstream.go @@ -1250,7 +1250,7 @@ func (dc *downstreamConn) authenticate(ctx context.Context, username, password s func (dc *downstreamConn) register(ctx context.Context) error { if dc.registered { - return fmt.Errorf("tried to register twice") + panic("tried to register twice") } if dc.sasl != nil {