No, a session does not timeout if it becomes inactive. The client must decide when it is finished with a session. The client can implement its own session timeout, where it must explicitly close the session when the timer expires.
Use the following method to explicitly close a session:
C++: Session::close()
Java: Session.close()
.NET: Session.Close()
Refer to the API Reference for more details.