small error touchup
This commit is contained in:
@ -452,7 +452,7 @@ func (t *http2Client) Close() (err error) {
|
|||||||
}
|
}
|
||||||
if t.state == closing {
|
if t.state == closing {
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
return errors.New("transport: Close() was already called")
|
return
|
||||||
}
|
}
|
||||||
t.state = closing
|
t.state = closing
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
@ -479,7 +479,7 @@ func (t *http2Client) GracefulClose() error {
|
|||||||
t.mu.Lock()
|
t.mu.Lock()
|
||||||
if t.state == closing {
|
if t.state == closing {
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
return errors.New("transport: Graceful close on a closed transport")
|
return nil
|
||||||
}
|
}
|
||||||
if t.state == draining {
|
if t.state == draining {
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
|
Reference in New Issue
Block a user