Open edgesite opened 6 years ago
Maybe we could make Client.Close likes:
func (client *Client) Close() { close(client.queue) waitCh := make(chan struct{}) go func() { client.wg.Wait() waitCh <- struct{}{} }() select { case <-time.NewTimer(SEND_TIMEOUT): case <-waitCh: } }
That would be helpful if we want to send all errors in the signal handler.
Maybe we could make Client.Close likes:
That would be helpful if we want to send all errors in the signal handler.