close connection after send