From b752ec44689aa5a3a0f3b9672b218691f161c7c1 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Wed, 18 Dec 2024 13:45:55 +0900 Subject: fipc: export config struct Also store full config as part of state. Signed-off-by: Ophestra Umiker --- internal/state/simple.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/state/simple.go') diff --git a/internal/state/simple.go b/internal/state/simple.go index ad3e4726..1a26f6f7 100644 --- a/internal/state/simple.go +++ b/internal/state/simple.go @@ -176,6 +176,10 @@ func (b *simpleBackend) Save(state *State) error { b.lock.Lock() defer b.lock.Unlock() + if state.Config == nil { + return errors.New("state does not contain config") + } + statePath := b.filename(state.PID) // create and open state data file -- cgit v1.3.1