add connection exception handling for recvfrom method