Skip to content

Commit

Permalink
merge(client): Merge pull request #69 from genshen/remove-client-Wait…
Browse files Browse the repository at this point in the history
…-parameter

feat(client): remove the unused parameter `*sync.Once` in `Handles.Wait` of client
  • Loading branch information
genshen committed Jul 31, 2023
2 parents ad3afab + dceebab commit ac6576a
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 ac6576a

Please sign in to comment.