Unverified Commit 30b9c776 authored by Flávio Fernandes's avatar Flávio Fernandes Committed by GitHub
Browse files

Fix HTTP request timeout usage in JS Runtime. (#1130)

parent 562d35ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -662,7 +662,7 @@ func (n *runtimeJavascriptNakamaModule) httpRequest(r *goja.Runtime) func(goja.F
		var timeoutMs int64
		timeoutArg := f.Argument(4)
		if timeoutArg != goja.Undefined() && timeoutArg != goja.Null() {
			timeoutMs = timeoutArg.ToInteger()
			timeoutMs = getJsInt(r, f.Argument(4))
		}
		if timeoutMs <= 0 {
			timeoutMs = 5_000