Do not query for version information when connection is closed
When a new connection is created to Openfire, it will send a version request.
For connections that very briefly connect, these requests are a source of warning logs: the request is generated, but by the time it's sent, the connection could have been closed again, resulting in "Could not route packet" warnings in the logs.
It a brief delay before the sending of a version request occurs. When a client remained connected for a few seconds, it's more likely to successfully be able to receive the version request.
However, Openfire should check if the session is still open, before actually sending the version request.
This would clean up some of the traffic that's generated in connections that are used for integration testing (which are typically very short-lived).