@@ -185,32 +185,30 @@ type pool struct {
185
185
186
186
type pipe struct {
187
187
conn net.Conn
188
- error atomic.Pointer [errs ]
189
- clhks atomic.Value // closed hook, invoked after the conn is closed
190
- pshks atomic.Pointer [pshks ] // pubsub hook, registered by the SetPubSubHooks
188
+ clhks atomic.Value // closed hook, invoked after the conn is closed
191
189
queue any
192
- cache rueidis.CacheStore
190
+ cache any
191
+ pshks atomic.Pointer [pshks ] // pubsub hook, registered by the SetPubSubHooks
192
+ error atomic.Pointer [errs ]
193
193
r * bufio.Reader
194
194
w * bufio.Writer
195
195
close chan struct {}
196
196
onInvalidations func ([]rueidis.RedisMessage )
197
- r2psFn func () ( p * pipe , err error ) // func to build pipe for resp2 pubsub
198
- r2pipe * pipe // internal pipe for resp2 pubsub only
199
- ssubs * any // pubsub smessage subscriptions
200
- nsubs * any // pubsub message subscriptions
201
- psubs * any // pubsub pmessage subscriptions
202
- pingTimer * time.Timer
197
+ ssubs * any // pubsub smessage subscriptions
198
+ nsubs * any // pubsub message subscriptions
199
+ psubs * any // pubsub pmessage subscriptions
200
+ r2p * any
201
+ pingTimer * time. Timer // timer for background ping
202
+ lftmTimer * time.Timer // lifetime timer
203
203
info map [string ]rueidis.RedisMessage
204
204
timeout time.Duration
205
205
pinggap time.Duration
206
206
maxFlushDelay time.Duration
207
- r2mu sync.Mutex
207
+ lftm time.Duration // lifetime
208
+ wrCounter atomic.Uint64
208
209
version int32
209
- _ [10 ]int32
210
210
blcksig int32
211
211
state int32
212
- waits int32
213
- recvs int32
214
212
bgState int32
215
213
r2ps bool // identify this pipe is used for resp2 pubsub or not
216
214
noNoDelay bool
0 commit comments