Improve the read loop in dns_dispatch before we switch to bufferevents