Closed connection after getting address