add delay for conn.close