Just stuff a couple of patches into the chamber with a short
cleaning rod - it seals excessive foam just fine. Push them out from the muzzle and clean the barrel as usual practice.
A couple of short bursts of foam works best so as not to waste too much product.


My home is the "sanctuary residence" for my firearms.