internal: fix typos in comments (#3046)

This commit is contained in:
yuxiaobo96 2019-10-01 06:30:07 +08:00 committed by Doug Fawley
parent 1e7ab3dab0
commit 861d8e7992
2 changed files with 3 additions and 3 deletions

View File

@ -1332,7 +1332,7 @@ func (ac *addrConn) tearDown(err error) {
curTr := ac.transport curTr := ac.transport
ac.transport = nil ac.transport = nil
// We have to set the state to Shutdown before anything else to prevent races // We have to set the state to Shutdown before anything else to prevent races
// between setting the state and logic that waits on context cancelation / etc. // between setting the state and logic that waits on context cancellation / etc.
ac.updateConnectivityState(connectivity.Shutdown) ac.updateConnectivityState(connectivity.Shutdown)
ac.cancel() ac.cancel()
ac.curAddr = resolver.Address{} ac.curAddr = resolver.Address{}
@ -1356,7 +1356,7 @@ func (ac *addrConn) tearDown(err error) {
}, },
}) })
// TraceEvent needs to be called before RemoveEntry, as TraceEvent may add trace reference to // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add trace reference to
// the entity beng deleted, and thus prevent it from being deleted right away. // the entity being deleted, and thus prevent it from being deleted right away.
channelz.RemoveEntry(ac.channelzID) channelz.RemoveEntry(ac.channelzID)
} }
ac.mu.Unlock() ac.mu.Unlock()

View File

@ -89,7 +89,7 @@ func Fatal(args ...interface{}) {
} }
// Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf. // Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf.
// It calles os.Exit() with exit code 1. // It calls os.Exit() with exit code 1.
func Fatalf(format string, args ...interface{}) { func Fatalf(format string, args ...interface{}) {
logger.Fatalf(format, args...) logger.Fatalf(format, args...)
// Make sure fatal logs will exit. // Make sure fatal logs will exit.