Browse Source

rafthttp: streamReader roundtrip -> dial

Yicheng Qin 10 years ago
parent
commit
8ec28f27d1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rafthttp/stream.go

+ 2 - 2
rafthttp/stream.go

@@ -219,7 +219,7 @@ func startStreamReader(tr http.RoundTripper, u string, t streamType, from, to, c
 
 
 func (cr *streamReader) run() {
 func (cr *streamReader) run() {
 	for {
 	for {
-		rc, err := cr.roundtrip()
+		rc, err := cr.dial()
 		if err != nil {
 		if err != nil {
 			log.Printf("rafthttp: roundtripping error: %v", err)
 			log.Printf("rafthttp: roundtripping error: %v", err)
 		} else {
 		} else {
@@ -307,7 +307,7 @@ func (cr *streamReader) isWorking() bool {
 	return cr.closer != nil
 	return cr.closer != nil
 }
 }
 
 
-func (cr *streamReader) roundtrip() (io.ReadCloser, error) {
+func (cr *streamReader) dial() (io.ReadCloser, error) {
 	cr.mu.Lock()
 	cr.mu.Lock()
 	u := cr.u
 	u := cr.u
 	term := cr.msgAppTerm
 	term := cr.msgAppTerm