Skip to content

Commit

Permalink
cmd/vinegar(bootstrapper): remove shutdown waiter, vinegar crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Feb 10, 2025
1 parent 2f46961 commit 6c114b8
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions cmd/vinegar/bootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
"os/exec"
"path/filepath"
"strings"
"syscall"
"time"

"github.com/apprehensions/rbxbin"
"github.com/godbus/dbus/v5"
Expand All @@ -23,15 +21,6 @@ import (
"github.com/vinegarhq/vinegar/sysinfo"
)

const killWait = 3 * time.Second

const (
// Randomly chosen log entry in cases where Studios process
// continues to run. Due to a lack of bug reports, it is unknown
// specifically which entry to use for these types of cases.
shutdownEntry = "[FLog::LifecycleManager] Exited ApplicationScope"
)

type bootstrapper struct {
*ui
win adw.Window
Expand Down Expand Up @@ -130,13 +119,6 @@ func (b *bootstrapper) handleRobloxLog(line string) {
slog.Log(context.Background(), logging.LevelRoblox, ent)
}

if strings.Contains(line, shutdownEntry) {
go func() {
time.Sleep(killWait)
syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
}()
}

if b.cfg.Studio.DiscordRPC {
if err := b.rp.Handle(line); err != nil {
slog.Error("Presence handling failed", "error", err)
Expand Down

0 comments on commit 6c114b8

Please sign in to comment.