change adapter strategy to avoid deadlock and memory leak