optimizate iocp wait and fix timeout bug