fixed socket select, was not reading received socket data properly, so select never got cleared