File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ import (
7
7
"strconv"
8
8
"time"
9
9
10
- "github.com/Allenxuxu/gev/metrics"
11
-
12
10
"github.com/Allenxuxu/gev/eventloop"
13
11
"github.com/Allenxuxu/gev/log"
12
+ "github.com/Allenxuxu/gev/metrics"
14
13
"github.com/Allenxuxu/gev/poller"
15
14
"github.com/Allenxuxu/ringbuffer"
16
15
"github.com/Allenxuxu/ringbuffer/pool"
@@ -286,14 +285,12 @@ func (c *Connection) sendInLoop(data []byte) {
286
285
_ , _ = c .outBuffer .Write (data )
287
286
} else {
288
287
n , err := unix .Write (c .fd , data )
289
- if err != nil {
290
- if err == unix .EAGAIN {
291
- return
292
- }
288
+ if err != nil && err != unix .EAGAIN {
293
289
c .handleClose (c .fd )
294
290
return
295
291
}
296
- if n == 0 {
292
+
293
+ if n <= 0 {
297
294
_ , _ = c .outBuffer .Write (data )
298
295
} else if n < len (data ) {
299
296
_ , _ = c .outBuffer .Write (data [n :])
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ require (
16
16
github.com/tidwall/evio v1.0.2
17
17
golang.org/x/net v0.0.0-20200625001655-4c5254603344
18
18
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
19
+ google.golang.org/protobuf v1.23.0
19
20
)
You can’t perform that action at this time.
0 commit comments