handle socket close in rtr