Wrong max socket value fix

The max socket value must be set to the highest socket value + 1 according to man page for select(). ( nfds  is the highest-numbered file descriptor in any of the three sets, plus 1.)