diff --git a/downstream.go b/downstream.go index 57bac33..b4a84ff 100644 --- a/downstream.go +++ b/downstream.go @@ -1690,6 +1690,9 @@ func (dc *downstreamConn) runUntilRegistered() error { go func() { <-ctx.Done() if err := ctx.Err(); err == context.DeadlineExceeded { + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + dc.SendMessage(ctx, &irc.Message{ Prefix: dc.srv.prefix(), Command: "ERROR",