It's sort of assumed that the one controlling the sentry is dead at that point (because the spy sneaked behind him and killed him, as that's what spies do.)
It depends on the location. I've had times when a disguised spy has run right up to me in plain sight, sapped the sentry, and whipped around and backstabbed me before I could fire enough shots to kill him even though I started shooting him the moment I saw him approaching and suspected he was a spy. So basically this gives sentry campers a sappable submachine gun to replace their pistol.