correctly shut down request handlers