fixed service hanging if proxy connection fails.