fix spelling mistakes (#3364)

Automatically submitted.
This commit is contained in:
yuxiaobo96 2019-10-09 15:24:18 +08:00 committed by corbot[bot]
parent 65458b2de2
commit bf356e79fc
7 changed files with 8 additions and 8 deletions

View file

@ -118,14 +118,14 @@ func (t *Transport) cleanup(all bool) {
}
}
// It is hard to pin a value to this, the import thing is to no block forever, loosing at cached connection is not terrible.
// It is hard to pin a value to this, the import thing is to no block forever, losing at cached connection is not terrible.
const yieldTimeout = 25 * time.Millisecond
// Yield return the connection to transport for reuse.
func (t *Transport) Yield(pc *persistConn) {
pc.used = time.Now() // update used time
// Make ths non-blocking, because in the case of a very busy forwarder we will *block* on this yield. This
// Make this non-blocking, because in the case of a very busy forwarder we will *block* on this yield. This
// blocks the outer go-routine and stuff will just pile up. We timeout when the send fails to as returning
// these connection is an optimization anyway.
select {