Fix pinger
This commit is contained in:
parent
588a268192
commit
83136b6c73
9
irc.go
9
irc.go
@ -108,10 +108,10 @@ func (irc *Connection) pingLoop() {
|
|||||||
case <-irc.endping:
|
case <-irc.endping:
|
||||||
irc.ticker.Stop()
|
irc.ticker.Stop()
|
||||||
irc.ticker2.Stop()
|
irc.ticker2.Stop()
|
||||||
break
|
irc.syncpinger <- true
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
irc.syncpinger <- true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (irc *Connection) Cycle() {
|
func (irc *Connection) Cycle() {
|
||||||
@ -197,9 +197,14 @@ func (irc *Connection) Loop() {
|
|||||||
close(irc.pwrite)
|
close(irc.pwrite)
|
||||||
close(irc.pread)
|
close(irc.pread)
|
||||||
irc.endping <- true
|
irc.endping <- true
|
||||||
|
irc.log.Printf("Syncing Threads\n")
|
||||||
|
irc.log.Printf("Syncing Reader\n")
|
||||||
<-irc.syncreader
|
<-irc.syncreader
|
||||||
|
irc.log.Printf("Syncing Writer\n")
|
||||||
<-irc.syncwriter
|
<-irc.syncwriter
|
||||||
|
irc.log.Printf("Syncing Pinger\n")
|
||||||
<-irc.syncpinger
|
<-irc.syncpinger
|
||||||
|
irc.log.Printf("Syncing Threads Done\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (irc *Connection) Connect(server string) error {
|
func (irc *Connection) Connect(server string) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user