Skip to content

Commit e2b796e

Browse files
committed
Make blocking 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.
1 parent f753f30 commit e2b796e

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)