summaryrefslogtreecommitdiff
path: root/src/core/servers-reconnect.h
blob: 50bcfc0657027da2242fcf6128924e6ca90f721f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __SERVER_RECONNECT_H
#define __SERVER_RECONNECT_H

/* wait for half an hour before trying to reconnect to host where last
   connection failed */
#define FAILED_RECONNECT_WAIT (60*30)

typedef struct {
	int tag;
	time_t next_connect;

	SERVER_CONNECT_REC *conn;
} RECONNECT_REC;

extern GSList *reconnects;

void server_reconnect_destroy(RECONNECT_REC *rec, int free_conn);

void servers_reconnect_init(void);
void servers_reconnect_deinit(void);

#endif