@@ -140,18 +140,27 @@ int rConfirmMasterRoleAsync(Redis *redis) {
140140 prop_error (fn , status );
141141
142142 reply = redisxReadReplyAsync (redis -> interactive , & status );
143- prop_error (fn , status );
143+ if (status ) {
144+ redisxDestroyRESP (reply );
145+ x_trace (fn , "ROLE" , status );
146+ }
144147
145148 if (redisxCheckDestroyRESP (reply , RESP_ARRAY , 0 ) != X_SUCCESS ) {
146149 // Fallback to using INFO replication...
147150 XLookupTable * info ;
148151 const XField * role ;
149152
150153 status = redisxSendRequestAsync (redis -> interactive , "INFO" , "replication" , NULL , NULL );
151- prop_error (fn , status );
154+ if (status ) {
155+ redisxDestroyRESP (reply );
156+ x_trace (fn , "sendRequestAsync(INFO)" , status );
157+ }
152158
153159 reply = redisxReadReplyAsync (redis -> interactive , & status );
154- prop_error (fn , status );
160+ if (status ) {
161+ redisxDestroyRESP (reply );
162+ x_trace (fn , "readReplyAsync(INFO)" , status );
163+ }
155164
156165 info = rConsumeInfoReply (reply );
157166 if (!info ) return x_trace (fn , NULL , X_FAILURE );
@@ -216,7 +225,10 @@ int rDiscoverSentinelAsync(Redis *redis) {
216225 if (status ) continue ;
217226
218227 reply = redisxReadReplyAsync (redis -> interactive , & status );
219- if (status ) continue ;
228+ if (status ) {
229+ redisxDestroyRESP (reply );
230+ continue ;
231+ }
220232
221233 if (redisxCheckDestroyRESP (reply , RESP_ARRAY , 2 ) == X_SUCCESS ) {
222234 RESP * * component = (RESP * * ) reply -> value ;
0 commit comments