handle persistent connections