Skip to content

Commit a0f4ca1

Browse files
authored
ommit port from call if 0
If the url has no port this breaks the call, so 0 makes it so it doesnt use the port at all in the call Could also do this with a bool to use a port or not but figured this is simpler
1 parent 04daedb commit a0f4ca1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Runtime/LLMCaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ protected virtual async Task<Ret> PostRequestRemote<Res, Ret>(string json, strin
281281

282282
while (tryNr != 0)
283283
{
284-
using (request = UnityWebRequest.Put($"{host}:{port}/{endpoint}", jsonToSend))
284+
using (request = UnityWebRequest.Put($"{host}{(port != 0 ? $":{port}" : "")}/{endpoint}", jsonToSend))
285285
{
286286
WIPRequests.Add(request);
287287

0 commit comments

Comments
 (0)