Skip to content

Commit

Permalink
feat(client): remove the unused parameter *sync.Once in `Handles.Wa…
Browse files Browse the repository at this point in the history
…it` of client
  • Loading branch information
genshen committed Jul 31, 2023
1 parent 8a095c0 commit dceebab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,15 @@ func (hdl *Handles) StartClient(c *Options, once *sync.Once) {
hdl.closed = false
}

func (hdl *Handles) Wait(once *sync.Once) error {

// Wait waits an error in client connection.
// If the connection lost or any other connection error happens, Wait will return an error.
func (hdl *Handles) Wait() error {
return hdl.eg.Wait()
}

// CliWait can be used in cli env to wait service to finish.
// similar to Wait, but CliWait is usually used in cli.
func (hdl *Handles) CliWait(once *sync.Once) {
go func() {
firstInterrupt := true
Expand Down

0 comments on commit dceebab

Please sign in to comment.