[[ Bug 12688 ]] Make sure socket callback is added to common runloop modes, and wait is broken when callback occurs.
Merge branch 'bugfix-12688' into develop