File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const ASCII = {
35
35
} as const ;
36
36
37
37
export const PUSH_TYPE_MAPPING = {
38
- [ RESP_TYPES . SIMPLE_STRING ] : Buffer
38
+ [ RESP_TYPES . BLOB_STRING ] : Buffer
39
39
} ;
40
40
41
41
// this was written with performance in mind, so it's not very readable... sorry :(
Original file line number Diff line number Diff line change @@ -183,9 +183,9 @@ export default class RedisCommandsQueue {
183
183
if ( this . #onPush( reply ) ) return ;
184
184
185
185
if ( PONG . equals ( reply [ 0 ] as Buffer ) ) {
186
- const { resolve } = this . #waitingForReply. shift ( ) ! ,
186
+ const { resolve, typeMapping } = this . #waitingForReply. shift ( ) ! ,
187
187
buffer = ( ( reply [ 1 ] as Buffer ) . length === 0 ? reply [ 0 ] : reply [ 1 ] ) as Buffer ;
188
- resolve ( buffer . toString ( ) ) ;
188
+ resolve ( typeMapping ?. [ RESP_TYPES . SIMPLE_STRING ] === Buffer ? buffer : buffer . toString ( ) ) ;
189
189
return ;
190
190
}
191
191
}
You can’t perform that action at this time.
0 commit comments