Skip to content

Commit c7aa4c0

Browse files
committed
fix: Fixing HttpTimeout notification & removing problematic (deprecated) HttpTimeout config property
1 parent 6790693 commit c7aa4c0

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

NodeToCode.uplugin

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 1,
3-
"Version": 1,
4-
"VersionName": "1.2.1",
3+
"Version": 2,
4+
"VersionName": "1.2.2",
55
"FriendlyName": "Node to Code",
66
"Description": "Quickly translate any Unreal Engine Blueprint to C++",
77
"Category": "Code Plugins",

Source/Private/NodeToCode.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

Source/Public/NodeToCode.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class UHttpTimeoutConfig : public UObject
3030
GENERATED_BODY()
3131

3232
public:
33-
UPROPERTY(Config)
34-
float HttpTimeout = 3600.0f;
3533

3634
UPROPERTY(Config)
3735
float HttpConnectionTimeout = 300.0f;

0 commit comments

Comments
 (0)