apache / rocketmq-client-go
Showing 1 of 1 files from the diff.

@@ -141,32 +141,28 @@
Loading
141 141
	defer primitive.BackHeader(header)
142 142
	for {
143 143
		if err != nil {
144 +
			// conn has been closed actively
144 145
			if r.isClosed(err) {
145 146
				return
146 147
			}
147 -
			rlog.Error("conn error, close connection", map[string]interface{}{
148 -
				rlog.LogKeyUnderlayError: err,
149 -
			})
148 +
			if err != io.EOF {
149 +
				rlog.Error("conn error, close connection", map[string]interface{}{
150 +
					rlog.LogKeyUnderlayError: err,
151 +
				})
152 +
			}
153 +
			c.closeConnection(r)
154 +
			r.destroy()
150 155
			break
151 156
		}
152 157
153 158
		_, err = io.ReadFull(r, header)
154 159
		if err != nil {
155 -
			if r.isClosed(err) {
156 -
				return
157 -
			}
158 -
			rlog.Error("io ReadFull error when read header", map[string]interface{}{
159 -
				rlog.LogKeyUnderlayError: err,
160 -
			})
161 160
			continue
162 161
		}
163 162
164 163
		var length int32
165 164
		err = binary.Read(bytes.NewReader(header), binary.BigEndian, &length)
166 165
		if err != nil {
167 -
			rlog.Error("binary decode header error", map[string]interface{}{
168 -
				rlog.LogKeyUnderlayError: err,
169 -
			})
170 166
			continue
171 167
		}
172 168
@@ -174,12 +170,6 @@
Loading
174 170
175 171
		_, err = io.ReadFull(r, buf)
176 172
		if err != nil {
177 -
			if r.isClosed(err) {
178 -
				return
179 -
			}
180 -
			rlog.Error("io ReadFull error when read payload", map[string]interface{}{
181 -
				rlog.LogKeyUnderlayError: err,
182 -
			})
183 173
			continue
184 174
		}
185 175
@@ -318,10 +308,6 @@
Loading
318 308
				"remote":                 conn.RemoteAddr(),
319 309
				rlog.LogKeyUnderlayError: err,
320 310
			})
321 -
		} else {
322 -
			rlog.Info("remoting conn closed", map[string]interface{}{
323 -
				"remote": conn.RemoteAddr(),
324 -
			})
325 311
		}
326 312
		return true
327 313
	})
Files Coverage
consumer 26.46%
internal 22.55%
primitive 20.26%
producer 31.43%
Project Totals (48 files) 24.85%
681.1
1.11.x=.11.x
TRAVIS_OS_NAME=linux
681.2
TRAVIS_OS_NAME=linux
1.12.x=.12.x

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading