blocking loop
This commit is contained in:
parent
996bed526a
commit
258c1a1faf
@ -136,7 +136,7 @@ int main(int argc, char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
//Start a thread, and call mosquitto? Loop() continuously in the thread to process network information
|
//Start a thread, and call mosquitto? Loop() continuously in the thread to process network information
|
||||||
int loop = mosquitto_loop_start(mosq);
|
int loop = mosquitto_loop_forever(mosq, -1, 1);
|
||||||
if(loop != MOSQ_ERR_SUCCESS)
|
if(loop != MOSQ_ERR_SUCCESS)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR: failed to create mosquitto loop");
|
fprintf(stderr, "ERROR: failed to create mosquitto loop");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user