function call to TF_RequestLease did not returnSolved

I am having some trouble with running my app in unbuntu.

the code has been working well in windows.

The scenario is this, the IP address for the server is set to 127.0.0.1 but in this use case the user has not installed TurboFloatServer.

I added some debug prints and found that the line below TD_RequestLease did not return. It some how got stuck.

Interesting thing is if I run in debug mode and step through, it works fine.

I need to retest to confirm (which I will do later today), if I set the server to be on another machine and with TurboFloatServer running, the problem will not appear.

Linus

hr = TF_SetLeaseCallback(tfHandle, LeaseCallback);qDebug() << "2 here" << hr; <<<This line prints 0 hr = TF_RequestLease(tfHandle); <<<< This line never returns because the next line was not executedqDebug() << "3 here" << hr;

Hey Linus,

In the current version of TurboFloat Library (3.5.5.2) the TF_RequestLease() function doesn't have a timeout. We've considered adding one, and I guess we should. That means currently there are certain circumstances in which TF_RequestLease() will never return (for example if it make a connection to a server and the server never responds or takes far too long to respond).

So, in the next version of the TurboFloat Library w'll add a 60-second timeout for cases in which nothing has been sent or received.

Hello Wyatt,

I am still stuck with this problem. Say a customer set the server IP wrongly and the function did not return due to what you mentioned. I realized that despite setting to the correct IP (verified using ping), the function never seems to return too.

I then try to kill the server process and restart it (this is in ubuntu).

I get the same results. No matter what I do, that function call will never return.

The only thing to make it work again is to reboot.

Other than waiting for the new release, is there anything we can do?

My question is, why wouldn't the turbofloatserver take the new IP address?

In my code, I checked that TF_SaveServer to the new IP address completed with hr = 0.

Linus

I realized that despite setting to the correct IP (verified using ping), the function never seems to return too.

The reason the function is never returning is because the "server" (or whatever accepted the connection) is never closing the connection. As it is now, TurboFloat library 3.5.5.2, doesn't "timeout" connections to slow/broken/or invalid servers. In the next version (3.5.7) the TurboFloat library will "timeout" connections to bad servers.

The way to avoid this now is to not connect to bad servers. Or, if you do, then kill the server process that's accepting the connection.

My question is, why wouldn't the turbofloatserver take the new IP address?

Make sure you're using the latest version. We fixed a bug in 3.5.4 which sounds like what you're describing. See Changes in TurboFloat.

We've added timeouts to the TF_RequestLease() function, so if the network is not configured correctly, or something goes wrong, TF_RequestLease() will just timeout and return TF_E_INET_TIMEOUT after around 30 seconds (the exact timeout depends on the circumstances, but it will be under a minute)

Get the latest version of TurboFloat here: https://wyday.com/limelm/api/#turbofloat