Make AJP read side handle write side shutdown more gracefully

Still not 100% correct, but it is a bit of a corner case, and this should fix the intermittent AJP failures in CI