Browse Source

api/rafthttp: remove deprecated req.Cancel.

caoming 7 years ago
parent
commit
4651f49a5c
1 changed files with 0 additions and 2 deletions
  1. 0 2
      etcdserver/api/rafthttp/fake_roundtripper_test.go

+ 0 - 2
etcdserver/api/rafthttp/fake_roundtripper_test.go

@@ -28,8 +28,6 @@ func (t *roundTripperBlocker) RoundTrip(req *http.Request) (*http.Response, erro
 	select {
 	select {
 	case <-t.unblockc:
 	case <-t.unblockc:
 		return &http.Response{StatusCode: http.StatusNoContent, Body: &nopReadCloser{}}, nil
 		return &http.Response{StatusCode: http.StatusNoContent, Body: &nopReadCloser{}}, nil
-	case <-req.Cancel:
-		return nil, errors.New("request canceled")
 	case <-ctx.Done():
 	case <-ctx.Done():
 		return nil, errors.New("request canceled")
 		return nil, errors.New("request canceled")
 	case <-c:
 	case <-c: