Fix the behavior of waiting
Merge branch 'socket-wait-abstraction' into all-of-the-updated-pull-requests