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 #1780 and it's a follow up for PR #1683,
PR #1754 and PR #1772.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit is contained in:
Filipe Brandenburger 2018-04-13 23:35:52 -07:00
parent f753f300ae
commit 165ee45334
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ func (m *Manager) Apply(pid int) error {
}
}
statusChan := make(chan string)
statusChan := make(chan string, 1)
if _, err := theConn.StartTransientUnit(unitName, "replace", properties, statusChan); err == nil {
select {
case <-statusChan: