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)
625625 if (master -> password == NULL || master -> server == NULL || master -> port == 0 )
626626 break ;
627627 ret = 1 ;
628- config_release_config ();
629628 mastersock = sock_connect_wto (master -> server , master -> port , 10 );
630629
631630 if (mastersock == SOCK_ERROR )
@@ -782,16 +781,17 @@ static void *_slave_thread(void *arg)
782781 max_interval = config -> master_update_interval ;
783782 thread_mutex_unlock (& _slave_mutex );
784783
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 */
786787 master = config -> master ;
787788 while (master ) {
788789 update_from_master (master );
789790 master = master -> next ;
790791 }
791792
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 );
795795
796796 thread_mutex_lock (& (config_locks ()-> relay_lock ));
797797
You can’t perform that action at this time.
0 commit comments