small error touchup

This commit is contained in:
iamqizhao
2016-05-18 17:19:50 -07:00
parent 5d62215b41
commit 2151d51eaa

View File

@ -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()