add limit queue running

This commit is contained in:
Jay 2019-01-31 17:19:12 +08:00
parent 09d018355d
commit 8e20a7cb0e
1 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,11 @@ import (
var client *irc.Client
var queue *QueueList
var channels []string
var queueRunning bool
func init() {
queueRunning = false
}
// InitIRC -
func InitIRC() {
@ -140,6 +145,10 @@ func LeaveAllChannel() {
}
func runQueue() {
if queueRunning == true {
return
}
queueRunning = true
go func() {
cnt := 0
for {