Ignore Shutdown exception in retry middleware, fixes #897