summaryrefslogtreecommitdiff
path: root/switchctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'switchctl.c')
-rw-r--r--switchctl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/switchctl.c b/switchctl.c
index b003909..6d5c42c 100644
--- a/switchctl.c
+++ b/switchctl.c
@@ -312,10 +312,14 @@ void process_cmd_type(const char* param, int fd, client_t* client_lst)
if(param) {
client_t* client = client_find(client_lst, fd);
if(client) {
- if(!strncmp(param, "master", 6))
+ if(!strncmp(param, "master", 6)) {
client->type = MASTER;
- else if(!strncmp(param, "standby", 7))
- client->type = STANDBY;
+ client->gpi_listener = 1;
+ }
+ else if(!strncmp(param, "standby", 7)) {
+ client->type = STANDBY;
+ client->gpi_listener = 1;
+ }
else if(!strncmp(param, "heartbeat", 9))
client->type = HEARTBEAT;
else {