Skip to content

Commit 165ee45

Browse files
committed
Make channel for StartTransientUnit buffered
So that, if a timeout happens and we decide to stop blocking on the operation, the writer will not block when they try to report the result of the operation. This should address Issue opencontainers#1780 and it's a follow up for PR opencontainers#1683, PR opencontainers#1754 and PR opencontainers#1772. Signed-off-by: Filipe Brandenburger <[email protected]>
1 parent f753f30 commit 165ee45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/cgroups/systemd/apply_systemd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func (m *Manager) Apply(pid int) error {
320320
}
321321
}
322322

323-
statusChan := make(chan string)
323+
statusChan := make(chan string, 1)
324324
if _, err := theConn.StartTransientUnit(unitName, "replace", properties, statusChan); err == nil {
325325
select {
326326
case <-statusChan:

0 commit comments

Comments
 (0)