File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,6 @@ static int update_from_master(master_server *master)
625
625
if (master -> password == NULL || master -> server == NULL || master -> port == 0 )
626
626
break ;
627
627
ret = 1 ;
628
- config_release_config ();
629
628
mastersock = sock_connect_wto (master -> server , master -> port , 10 );
630
629
631
630
if (mastersock == SOCK_ERROR )
@@ -782,16 +781,17 @@ static void *_slave_thread(void *arg)
782
781
max_interval = config -> master_update_interval ;
783
782
thread_mutex_unlock (& _slave_mutex );
784
783
785
- /* update all non-legacy master servers */
784
+ /* update all non-legacy master servers. the config lock is being
785
+ * held for the entire update process. consider making a copy of
786
+ * the master linked list and releasing the lock */
786
787
master = config -> master ;
787
788
while (master ) {
788
789
update_from_master (master );
789
790
master = master -> next ;
790
791
}
791
792
792
- /* the connection could take some time, so the lock can drop */
793
- if (update_from_master_legacy (config ))
794
- config = config_get_config ();
793
+ /* update legacy master server */
794
+ update_from_master_legacy (config );
795
795
796
796
thread_mutex_lock (& (config_locks ()-> relay_lock ));
797
797
You can’t perform that action at this time.
0 commit comments