export filter hook to abort connection early; fix potential deadlock

1. async callback is used
2. in async callback, a sync request is issued