Skip to content

Commit c0367dd

Browse files
committed
fix unaligned 64-bit atomic operation issue on arm32 device
1 parent 4071d56 commit c0367dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

connection.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ type CallBack interface {
2424

2525
// Connection TCP 连接
2626
type Connection struct {
27+
outBufferLen atomic.Int64
28+
inBufferLen atomic.Int64
29+
activeTime atomic.Int64
2730
fd int
2831
connected atomic.Bool
2932
buffer *ringbuffer.RingBuffer
3033
outBuffer *ringbuffer.RingBuffer // write buffer
3134
inBuffer *ringbuffer.RingBuffer // read buffer
32-
outBufferLen atomic.Int64
33-
inBufferLen atomic.Int64
3435
callBack CallBack
3536
loop *eventloop.EventLoop
3637
peerAddr string
3738
ctx interface{}
3839
KeyValueContext
3940

4041
idleTime time.Duration
41-
activeTime atomic.Int64
4242
timingWheel *timingwheel.TimingWheel
4343
timer at.Value
4444
protocol Protocol

0 commit comments

Comments
 (0)