Skip to content

Commit 3af5fe7

Browse files
committed
Minor fixups
1 parent 399f4de commit 3af5fe7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

core/http/views/p2p.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<div class="models mt-12 text-center">
1212
<h2 class="text-3xl font-semibold text-gray-100 mb-8">
13-
<i class="fa-solid fa-network-wired"></i> P2P Network</h2>
13+
<i class="fa-solid fa-network-wired"></i> P2P Network <a href="https://localai.io/features/distribute/" target="_blank" >
14+
<i class="fas fa-circle-info pr-2"></i>
15+
</a> </h2>
1416

1517
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-8 inline-block">
1618
<p class="text-xl font-semibold text-gray-200">Total Workers Detected: {{ len .Nodes}}</p>

core/p2p/p2p.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func LLamaCPPRPCServerDiscoverer(ctx context.Context, token string) error {
166166
AddNode(tunnel)
167167

168168
var tunnelAddresses []string
169-
for _, v := range nodes {
169+
for _, v := range GetAvailableNodes() {
170170
if v.IsOnline() {
171171
tunnelAddresses = append(tunnelAddresses, v.TunnelAddress)
172172
} else {
@@ -237,7 +237,9 @@ func discoveryTunnels(ctx context.Context, token string) (chan NodeData, error)
237237
}
238238
ensureService(ctx, n, nd, k)
239239
muservice.Lock()
240-
tunnels <- service[nd.Name].NodeData
240+
if _, ok := service[nd.Name]; ok {
241+
tunnels <- service[nd.Name].NodeData
242+
}
241243
muservice.Unlock()
242244
}
243245
}

0 commit comments

Comments
 (0)