XMPP connection instance and keeping it alive

I tried with smack-bosh which works fine and maintains a connection until I call disconnect

will the same applicable for smack-tcp, the reason I am asking this that I see </stream…> and connection closed logs after calling login