DB ping thread introduced.
FossilOrigin-Name: 4a8e776060bfbfc8d2cbb51067ea1adb2b0d9939183d447f1b227060334dae17
This commit is contained in:
parent
6cdd681ef0
commit
04023ecc9a
@ -34,10 +34,19 @@
|
||||
|
||||
#include "socklist.h"
|
||||
|
||||
|
||||
#include "db.h"
|
||||
|
||||
int ac_run();
|
||||
|
||||
void alive_thread(void *data)
|
||||
{
|
||||
while(1){
|
||||
sleep(5);
|
||||
db_ping();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, const char * argv[])
|
||||
{
|
||||
// send_image_file(0,"/home/tube/Downloads/c1130-rcvk9w8-tar.124-25e.JAP.tar");
|
||||
@ -65,6 +74,9 @@ int main (int argc, const char * argv[])
|
||||
db_init();
|
||||
db_start();
|
||||
db_ping();
|
||||
|
||||
pthread_t alth;
|
||||
pthread_create (&alth, NULL, alive_thread, (void *)0);
|
||||
|
||||
|
||||
#ifdef WITH_DTLS
|
||||
|
Loading…
Reference in New Issue
Block a user