-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5 sec delay in the loop() function #39
Comments
There isn't any 5 second delay in the library - can you point to where you think there is one? |
I know that there isn't an explicit delay function called.... for (uint16_t i = 0;i<length;i++) If I comment readByte() there isn't the delay.... Paolo. |
The client checks to see if there is data available before reading the packet. But once it starts reading the packet it will block until a whole packet has been read. The |
If I write a simple sketch with only client.loop() inside main loop() and print millis() function output I see 1161118 As you can see there is a about 5 sec between the calls.... The example is simple void loop() The client is connected but it doesn't publish anything and it isn't subscribed to anything. Paolo. |
That suggests there is data available for the client to try reading - which shouldn't be the case if the client isn't subscribed to anything. As I linked to in my previous comment, the client will only try reading a whole packet from the network if What hardware are you running this on? |
I'm running on a new Intel Galileo board :-) |
Possibly - obviously I cannot comment on how the galileo performs. I don't consider this an issue with this library - so with your agreement, I'd like to close this item? |
Oh yes...I try to discover where is the problem. |
Yes - not had time to look. |
Hello,
I'm using this great library on Intel Galileo board with some little changes as reported in another issue.
I see that there is a 5 sec delay inside client.loop() function when the client doesn't receive any data. Why ?
In this way if I use client.loop() as first statement in the loop() sketch function, the subsequent instruction are always executed with a 5 sec delay.
Paolo.
The text was updated successfully, but these errors were encountered: