Inconsistent HTTP Connnection

One question? How can we be sure that the program will never stop on the line

while(client.connected()

If the client connection does not end we will never go out of the while loop