From 9ba03b909554b57df34cde1a4c6160ed36d31f65 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 11 Jul 2022 11:25:19 +0200 Subject: [PATCH] upstream: ignore RPL_ENDOFWHO without pending command --- upstream.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upstream.go b/upstream.go index 3ed8b85..e0a61de 100644 --- a/upstream.go +++ b/upstream.go @@ -1429,8 +1429,10 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err dc, cmd := uc.dequeueCommand("WHO") if cmd == nil { - return fmt.Errorf("unexpected RPL_ENDOFWHO: no matching pending WHO") + // Some servers send RPL_TRYAGAIN followed by RPL_ENDOFWHO + return nil } else if dc == nil { + // Downstream connection is gone return nil }