@@ -129,15 +129,15 @@ static char const* const messageText[] =
129129
130130static BackgroundWorker MtmSender = {
131131 "mtm-sender" ,
132- BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION , /* do not need connection to the database */
132+ BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION ,
133133 BgWorkerStart_ConsistentState ,
134134 MULTIMASTER_BGW_RESTART_TIMEOUT ,
135135 MtmTransSender
136136};
137137
138138static BackgroundWorker MtmRecevier = {
139139 "mtm-receiver" ,
140- BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION , /* do not need connection to the database */
140+ BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION ,
141141 BgWorkerStart_ConsistentState ,
142142 MULTIMASTER_BGW_RESTART_TIMEOUT ,
143143 MtmTransReceiver
@@ -337,9 +337,11 @@ static void MtmCheckResponse(MtmArbiterMessage* resp)
337337static void MtmScheduleHeartbeat ()
338338{
339339// Assert(!last_sent_heartbeat || last_sent_heartbeat + MSEC_TO_USEC(MtmHeartbeatRecvTimeout) >= MtmGetSystemTime());
340- enable_timeout_after (heartbeat_timer , MtmHeartbeatSendTimeout );
341- send_heartbeat = true;
342- PGSemaphoreUnlock (& Mtm -> votingSemaphore );
340+ if (!stop ) {
341+ enable_timeout_after (heartbeat_timer , MtmHeartbeatSendTimeout );
342+ send_heartbeat = true;
343+ PGSemaphoreUnlock (& Mtm -> votingSemaphore );
344+ }
343345}
344346
345347static void MtmSendHeartbeat ()
0 commit comments