You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The jobHandler used e.g. by Conn.StartUnitContext blocks for ever if nothing reads from the provided channel.
I think this write to the result channel should be non-blocking, like this:
c.jobListener.Lock()
out, ok := c.jobListener.jobs[job]
if ok {
select {
case out <- result:
default:
fmt.Println("failed to write result to job channel")
}
delete(c.jobListener.jobs, job)
}
c.jobListener.Unlock()
I'm not sure, what is the best way to log something or if it's even necessary,
The text was updated successfully, but these errors were encountered:
j-licht
added a commit
to j-licht/go-systemd
that referenced
this issue
Oct 13, 2023
When handling the jobComplete signal, only try to write to the channel
and do not block on the channel write. If nothing reads from this
channel, the function blocks forever and makes it impossible to start
new jobs.
Fixescoreos#429
go-systemd/dbus/methods.go
Line 48 in d843340
The jobHandler used e.g. by Conn.StartUnitContext blocks for ever if nothing reads from the provided channel.
I think this write to the result channel should be non-blocking, like this:
I'm not sure, what is the best way to log something or if it's even necessary,
The text was updated successfully, but these errors were encountered: