add onclose lisner for clients