Fix socket timeout

0 is "no timeout", Infinity seems to be ignored.