From 83136b6c7310f11e9579645e6a887dfeab55da81 Mon Sep 17 00:00:00 2001 From: Thomas Jager Date: Sun, 11 Nov 2012 10:51:14 +0100 Subject: [PATCH] Fix pinger --- irc.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/irc.go b/irc.go index 821c20d..5344b25 100644 --- a/irc.go +++ b/irc.go @@ -108,10 +108,10 @@ func (irc *Connection) pingLoop() { case <-irc.endping: irc.ticker.Stop() irc.ticker2.Stop() - break + irc.syncpinger <- true + return } } - irc.syncpinger <- true } func (irc *Connection) Cycle() { @@ -197,9 +197,14 @@ func (irc *Connection) Loop() { close(irc.pwrite) close(irc.pread) irc.endping <- true + irc.log.Printf("Syncing Threads\n") + irc.log.Printf("Syncing Reader\n") <-irc.syncreader + irc.log.Printf("Syncing Writer\n") <-irc.syncwriter + irc.log.Printf("Syncing Pinger\n") <-irc.syncpinger + irc.log.Printf("Syncing Threads Done\n") } func (irc *Connection) Connect(server string) error {