client: support sending events asynchronously
Makes blocking and waiting for success/error optional, also allows concurrent use of the rest of the client while events are sent.
This commit is contained in:
parent
c42bec118e
commit
03222d488c
2 changed files with 27 additions and 13 deletions
|
@ -167,7 +167,7 @@ func TestClientEvent(t *testing.T) {
|
|||
Type: omaha.EventTypeDownloadComplete,
|
||||
Result: omaha.EventResultSuccess,
|
||||
}
|
||||
if err := ac.Event(event); err != nil {
|
||||
if err := <-ac.Event(event); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue