Skip to content

Commit

Permalink
Fix some small comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iamqizhao committed May 26, 2016
1 parent 817b482 commit fca009f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ type BalancerGetOptions struct {
// This is the EXPERIMENTAL API and may be changed or extended in the future.
type Balancer interface {
// Start does the initialization work to bootstrap a Balancer. For example,
// this function may start the name resolution and watch the updates.
// this function may start the name resolution and watch the updates. It will
// be called when dialing.
Start(target string) error
// Up informs the Balancer that gRPC has a connection to the server at
// addr. It returns down which is called once the connection to addr gets
Expand Down
8 changes: 4 additions & 4 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,14 @@ func (ac *addrConn) tearDown(err error) {
}
ac.cc.mu.Unlock()
}()
if ac.down != nil {
ac.down(downErrorf(false, false, "%v", err))
ac.down = nil
}
if ac.state == Shutdown {
return
}
ac.state = Shutdown
if ac.down != nil {
ac.down(downErrorf(false, false, "%v", err))
ac.down = nil
}
ac.stateCV.Broadcast()
if ac.events != nil {
ac.events.Finish()
Expand Down
4 changes: 2 additions & 2 deletions naming/naming.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ type Resolver interface {
// Watcher watches for the updates on the specified target.
type Watcher interface {
// Next blocks until an update or error happens. It may return one or more
// updates. The first call should get the full set of the results. It only
// returns the error Watcher cannot recover.
// updates. The first call should get the full set of the results. It should
// return an error if and only if Watcher cannot recover.
Next() ([]*Update, error)
// Close closes the Watcher.
Close()
Expand Down
1 change: 0 additions & 1 deletion transport/http2_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ func (t *http2Client) CloseStream(s *Stream, err error) {
t.mu.Lock()
if t.activeStreams == nil {
t.mu.Unlock()
t.Close()
return
}
if t.streamsQuota != nil {
Expand Down

0 comments on commit fca009f

Please sign in to comment.