File tree 2 files changed +6
-5
lines changed 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ func (a *Args) SetBytesKV(key, value []byte) {
230
230
231
231
// SetNoValue sets only 'key' as argument without the '='.
232
232
//
233
- // Only key in argumemt , like key1&key2
233
+ // Only key in argument , like key1&key2
234
234
func (a * Args ) SetNoValue (key string ) {
235
235
a .args = setArg (a .args , key , "" , argsNoValue )
236
236
}
Original file line number Diff line number Diff line change @@ -2916,14 +2916,15 @@ func (c *pipelineConnClient) getClientName() []byte {
2916
2916
2917
2917
var errPipelineConnStopped = errors .New ("pipeline connection has been stopped" )
2918
2918
2919
- func acquirePipelineWork (pool * sync.Pool , timeout time.Duration ) * pipelineWork {
2919
+ func acquirePipelineWork (pool * sync.Pool , timeout time.Duration ) ( w * pipelineWork ) {
2920
2920
v := pool .Get ()
2921
- if v == nil {
2922
- v = & pipelineWork {
2921
+ if v != nil {
2922
+ w = v .(* pipelineWork )
2923
+ } else {
2924
+ w = & pipelineWork {
2923
2925
done : make (chan struct {}, 1 ),
2924
2926
}
2925
2927
}
2926
- w := v .(* pipelineWork )
2927
2928
if timeout > 0 {
2928
2929
if w .t == nil {
2929
2930
w .t = time .NewTimer (timeout )
You can’t perform that action at this time.
0 commit comments