mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 06:25:00 +00:00
fix(p2p): avoid starting the node twice (#3349)
* fix(p2p): avoid starting the node twice Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(p2p): keep exposing service if we don't start the llama.cpp runner Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
70e53bc191
commit
af095204fa
3 changed files with 35 additions and 34 deletions
|
@ -202,13 +202,9 @@ func ServiceDiscoverer(ctx context.Context, n *node.Node, token, servicesID stri
|
|||
func discoveryTunnels(ctx context.Context, n *node.Node, token, servicesID string, allocate bool) (chan NodeData, error) {
|
||||
tunnels := make(chan NodeData)
|
||||
|
||||
err := n.Start(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("creating a new node: %w", err)
|
||||
}
|
||||
ledger, err := n.Ledger()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("creating a new node: %w", err)
|
||||
return nil, fmt.Errorf("getting the ledger: %w", err)
|
||||
}
|
||||
// get new services, allocate and return to the channel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue