socket select timeout to avoid blocking - phase 1
socket select timeout to avoid blocking - phase 2