modified TcpHandler::recvData() to check for errors and closed connections