JBTM-1650 updat to set session TPEV_DISCONIMM when socket closed

Created a new pull request to do the rebase while amos is away. This (at least starts life) as the same as pull #43