Paraphrasing what Jeroen and Peter have said, the misconception here is that the client is connected to the server. It's not (HTTP is stateless; disconnected). It may have an
active session, but there's no connection as such, like with sockets. So the server can't know if the client "disconnects" as it was never connected in the first place.
Typically, a session will expire if no requests are made during a predetermined timeout period.
Does that make sense?
Jules