Add terminate-session in sockets