diff --git a/lavalink.go b/lavalink.go index b64bdac..abd329b 100644 --- a/lavalink.go +++ b/lavalink.go @@ -3,8 +3,10 @@ package gavalink import ( "errors" "log" + "net/http" "os" "sort" + "time" ) // Log sets the log.Logger gavalink will write to @@ -50,10 +52,15 @@ func NewLavalink(shards string, userID string) *Lavalink { func (lavalink *Lavalink) AddNodes(nodeConfigs ...NodeConfig) error { nodes := make([]*Node, len(nodeConfigs)) + client := &http.Client{ + Timeout: 60 * time.Second, + } + for i, c := range nodeConfigs { n := &Node{ config: c, manager: lavalink, + client: client, } err := n.open()