net: tcp: Only return -ETIMEDOUT if timeout!=0 in connect

Previous commit: 6e6281af96b93e8a5519c61e4e14e03f9492f3a4
"net: tcp: Only return -ETIMEDOUT if timeout>0 in connect"
missed that K_FOREVER needs a semaphore taken, but has a
value of -1.

Change the logic here to timeout!=0 to handle this case.

Change-Id: Iae6a784443810130a7de267226483426fbd4f0d4
Signed-off-by: Michael Scott <michael.scott@linaro.org>
1 file changed