hopefully fix all issues with random disconnects during stupid panics from GPU mode.

This commit is contained in:
KingKDot
2026-04-07 13:26:52 -05:00
parent acc010be81
commit a0ed6d7cc1
10 changed files with 78 additions and 8 deletions
@@ -1,8 +1,10 @@
package filesearch
import (
"log"
"os"
"path/filepath"
"runtime/debug"
"strings"
"sync"
)
@@ -31,6 +33,11 @@ func LookupExe(exeName string, workers int, onResult ResultFunc) {
wg.Add(1)
go func() {
defer wg.Done()
defer func() {
if r := recover(); r != nil {
log.Printf("[filesearch] worker panic: %v\n%s", r, debug.Stack())
}
}()
for dir := range dirs {
walkDir(dir, lowerExe, dirs, &inflight, onResult)
inflight.Done()