php-memcached-dev/php-memcached — comment on commit b46bfbd5e048b1bc594838f4bae96ffaa5559730
File:  line 0
By trvrnrth:

Currently when the fail-over kicks in and the retry is successful, subsequent calls to getResultCode return the initial failure result code as i_obj->rescode is not reset to RES_SUCCESS (or similar) in the code executed after the goto.

The simplest solution as I see it would probably be to handle doing so in php_memc_handle_error unless there is a specific reason this is currently skipped for the success case that I've not spotted?