@@ -725,21 +725,13 @@ func (c *Conn) Process(ctx context.Context, cmd Cmder) error {
725725 return err
726726}
727727
728- func (c * Conn ) processPipeline (ctx context.Context , cmds []Cmder ) error {
729- return c .hooks .processPipeline (ctx , cmds )
730- }
731-
732- func (c * Conn ) processTxPipeline (ctx context.Context , cmds []Cmder ) error {
733- return c .hooks .processTxPipeline (ctx , cmds )
734- }
735-
736728func (c * Conn ) Pipelined (ctx context.Context , fn func (Pipeliner ) error ) ([]Cmder , error ) {
737729 return c .Pipeline ().Pipelined (ctx , fn )
738730}
739731
740732func (c * Conn ) Pipeline () Pipeliner {
741733 pipe := Pipeline {
742- exec : c .processPipeline ,
734+ exec : c .hooks . processPipeline ,
743735 }
744736 pipe .init ()
745737 return & pipe
@@ -752,7 +744,10 @@ func (c *Conn) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmd
752744// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
753745func (c * Conn ) TxPipeline () Pipeliner {
754746 pipe := Pipeline {
755- exec : c .processTxPipeline ,
747+ exec : func (ctx context.Context , cmds []Cmder ) error {
748+ cmds = wrapMultiExec (ctx , cmds )
749+ return c .hooks .processTxPipeline (ctx , cmds )
750+ },
756751 }
757752 pipe .init ()
758753 return & pipe
0 commit comments