feat: add expiry

This commit is contained in:
James Houlahan
2020-07-23 14:55:55 +02:00
parent 369c6ebf85
commit 5ad307868e
4 changed files with 48 additions and 6 deletions

View File

@ -61,9 +61,9 @@ func (c *Confirmer) SetResult(id string, value bool) error {
return errors.New("no such request")
}
req.value <- value
req.ch <- value
close(req.value)
close(req.ch)
delete(c.requests, id)
return nil