Fix thread unsafety issue
[platform/core/uifw/stt.git] / client / stt.c
index 8a55d34..a08dacc 100644 (file)
@@ -1042,7 +1042,9 @@ int stt_prepare(stt_h stt)
                return STT_ERROR_INVALID_STATE;
        }
 
+       ecore_thread_main_loop_begin();
        g_connect_timer = ecore_timer_add(0.02, __stt_connect_daemon, (void*)client);
+       ecore_thread_main_loop_end();
 
        SLOG(LOG_DEBUG, TAG_STTC, "=====");
        SLOG(LOG_DEBUG, TAG_STTC, " ");