close connection after sent data