Repeated TCP connection cause stack problems