-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The program hangs when this api in repeatedly used in a go routine. See following code :
package main
import (
"fmt"
"github.com/multiplay/go-ts3"
)
func main() {
conn, err := ts3.NewClient("ts.foo.bar:10011")
if err != nil {
fmt.Println("ERROR : ", err)
}
if err := conn.Login("foo", "bar"); err != nil {
fmt.Println("ERROR : ", err)
}
if err := conn.Use(1); err != nil {
fmt.Println("ERROR : ", err)
}
go loop(conn) //Here if you remove the "go", the program will work as expected.
for {
}
}
func loop(conn *ts3.Client){
for {
//time.Sleep(time.Second*10) //waiting doesn't matter, you may wait an hour it will still hang
conn.Server.GroupList() //The program will hang after 4 iteration of GroupList() or 40-50 iteration of ClientDBList() but all commands eventually hang after a while
fmt.Println("Tick")
}
}
Metadata
Metadata
Assignees
Labels
No labels