added reset function in case of socket timeout