@@ -137,23 +137,19 @@ void FNodeToCodeModule::ConfigureHttpTimeouts()
137137
138138 // Check current settings
139139 TimeoutConfig->LoadConfig ();
140-
141- // If all settings are already sufficient, we're done
142- if (TimeoutConfig->HttpTimeout >= 3600 .0f &&
143- TimeoutConfig->HttpConnectionTimeout >= 300 .0f &&
144- TimeoutConfig->HttpActivityTimeout >= 3600 .0f )
140+ if (TimeoutConfig->HttpConnectionTimeout >= 300 .0f &&
141+ TimeoutConfig->HttpActivityTimeout >= 3600 .0f )
145142 {
146143 FN2CLogger::Get ().Log (TEXT (" HTTP timeout settings already configured correctly" ), EN2CLogSeverity::Info);
147144 return ;
148145 }
149-
146+
150147 // Apply our settings values
151- TimeoutConfig->HttpTimeout = 3600 .0f ;
152148 TimeoutConfig->HttpConnectionTimeout = 300 .0f ;
153149 TimeoutConfig->HttpActivityTimeout = 3600 .0f ;
154150
155151 // Save the config, which writes to the specified ini file
156- TimeoutConfig->SaveConfig (CPF_Config, *DefaultEngineIniPath);
152+ TimeoutConfig->TryUpdateDefaultConfigFile ( *DefaultEngineIniPath);
157153
158154 FN2CLogger::Get ().Log (
159155 TEXT (" Added HTTP timeout settings to DefaultEngine.ini to support long-running Ollama requests" ),
@@ -163,12 +159,6 @@ void FNodeToCodeModule::ConfigureHttpTimeouts()
163159 // Apply the changes immediately
164160 FConfigCacheIni::LoadGlobalIniFile (GEngineIni, TEXT (" Engine" ));
165161 FHttpModule::Get ().UpdateConfigs ();
166-
167- // Also apply for this session
168- #if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION < 4
169- // For UE 5.3, we can use the deprecated method
170- FHttpModule::Get ().SetHttpTimeout (3600 .0f );
171- #endif
172162
173163 // Show notification that restart is required for full effect
174164 ShowRestartRequiredNotification ();
@@ -185,7 +175,7 @@ void FNodeToCodeModule::ShowRestartRequiredNotification()
185175 FNotificationInfo Info (LOCTEXT (" HttpSettingsChangedTitle" , " Node To Code Plugin" ));
186176 Info.Text = LOCTEXT (" HttpSettingsChangedMessage" ,
187177 " HTTP timeout settings have been updated for Node To Code. Please restart the editor for them to take effect." );
188- Info.bFireAndForget = false ;
178+ Info.bFireAndForget = true ;
189179 Info.FadeOutDuration = 0 .5f ;
190180 Info.ExpireDuration = 10 .0f ;
191181 Info.bUseThrobber = false ;
0 commit comments