Resolve issue with client reference
This commit is contained in:
parent
ef903095c9
commit
c4c66b5c23
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue