From 6a3fc713978a0c1c9290a4afd08b47886b49b635 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 13 Aug 2022 16:14:26 +0200 Subject: Update dependencies and go1.18 (#1873) * Update dependencies and go1.18 * Exclude unnecessary linters and update build to go1.18 --- vendor/github.com/lrstanley/girc/README.md | 9 ++------- vendor/github.com/lrstanley/girc/conn.go | 4 +++- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'vendor/github.com/lrstanley/girc') diff --git a/vendor/github.com/lrstanley/girc/README.md b/vendor/github.com/lrstanley/girc/README.md index 9f62ca85..76acda53 100644 --- a/vendor/github.com/lrstanley/girc/README.md +++ b/vendor/github.com/lrstanley/girc/README.md @@ -1,6 +1,7 @@

+

girc -- :bomb: girc is a flexible IRC library for Go :ok_hand:

@@ -46,13 +47,7 @@ ## :link: Table of Contents - - [Features](#features) - - [Installing](#installing) - - [Examples](#examples) - - [References](#references) - - [Support & Assistance](#raising_hand_man-support--assistance) - - [Contributing](#handshake-contributing) - - [License](#balance_scale-license) + - []() ## Features diff --git a/vendor/github.com/lrstanley/girc/conn.go b/vendor/github.com/lrstanley/girc/conn.go index b691403c..626a6dca 100644 --- a/vendor/github.com/lrstanley/girc/conn.go +++ b/vendor/github.com/lrstanley/girc/conn.go @@ -588,6 +588,7 @@ func (c *Client) pingLoop(ctx context.Context, errs chan error, wg *sync.WaitGro started := time.Now() past := false + pingSent := false for { select { @@ -603,7 +604,7 @@ func (c *Client) pingLoop(ctx context.Context, errs chan error, wg *sync.WaitGro } c.conn.mu.RLock() - if time.Since(c.conn.lastPong) > c.Config.PingDelay+(60*time.Second) { + if pingSent && time.Since(c.conn.lastPong) > c.Config.PingDelay+(60*time.Second) { // It's 60 seconds over what out ping delay is, connection // has probably dropped. err := ErrTimedOut{ @@ -625,6 +626,7 @@ func (c *Client) pingLoop(ctx context.Context, errs chan error, wg *sync.WaitGro c.conn.mu.Unlock() c.Cmd.Ping(fmt.Sprintf("%d", time.Now().UnixNano())) + pingSent = true case <-ctx.Done(): wg.Done() return -- cgit v1.2.3