Set a time limit to check connection before Write()