Sign In Register

How can we help you today?

Start a new topic
Answered

Timeout (s) - GS Unity

 

                public void Send (Action<OUT> callback, int timeoutSeconds)
		{
			if (this.request.MaxQueueTimeInSeconds == 0) {
				this.request.MaxQueueTimeInSeconds = timeoutSeconds;
			}
			if (this.request.MaxResponseTimeInSeconds == 0) {
				this.request.MaxResponseTimeInSeconds = timeoutSeconds;
			}
			this.request.Send (delegate (GSObject response) {
				if (callback != null) {
					callback ((OUT)((object)this.BuildResponse (response)));
				}
			});
		}

		public void Send (Action<OUT> successCallback, Action<OUT> errorCallback, int timeoutSeconds)
		{
			if (this.request.MaxQueueTimeInSeconds == 0) {
				this.request.MaxQueueTimeInSeconds = timeoutSeconds;
			}
			if (this.request.MaxResponseTimeInSeconds == 0) {
				this.request.MaxResponseTimeInSeconds = timeoutSeconds;
			}
			this.request.Send (delegate (GSObject response) {
				if (successCallback != null) {
					successCallback ((OUT)((object)this.BuildResponse (response)));
				}
			}, delegate (GSObject response) {
				if (errorCallback != null) {
					errorCallback ((OUT)((object)this.BuildResponse (response)));
				}
			});
		}

		public IN SetMaxQueueTimeInSeconds (int maxQueueTime)
		{
			this.request.MaxQueueTimeInSeconds = maxQueueTime;
			return (IN)((object)this);
		}

		public IN SetMaxResponseTimeInSeconds (int maxResponseTime)
		{
			this.request.MaxResponseTimeInSeconds = maxResponseTime;
			return (IN)((object)this);
		}

 

 Hi,


We are having quite a bit of timeouts for requests. If I send a request at t=0s, the request times out at t=5s, which is expected because the default timeout value is 5 seconds.

// PlatformBase.cs
RequestTimeoutSeconds = 5;

 We did notice that the request does get a response at about t=8s, at which nothing happens because the request is said to have already timed out.

Now the solution to this would be as below, correct?

 

logEvent.SetMaxQueueTimeInSeconds(timeOutVal);
logEvent.SetMaxResponseTimeInSeconds(timeOutVal);

 

 

Well, whatever the timeOutVal is does nothing to change the default 5s value, unless we manually set it as follows, which works.

 

GS.GSPlatform.RequestTimeoutSeconds = 10;

 

 

Looking at the assembly, I do see that the queue and response time values are being set, but I feel that nothing is referencing them.

                public void Send (Action<OUT> callback, int timeoutSeconds)
		{
			if (this.request.MaxQueueTimeInSeconds == 0) {
				this.request.MaxQueueTimeInSeconds = timeoutSeconds;
			}
			if (this.request.MaxResponseTimeInSeconds == 0) {
				this.request.MaxResponseTimeInSeconds = timeoutSeconds;
			}
			this.request.Send (delegate (GSObject response) {
				if (callback != null) {
					callback ((OUT)((object)this.BuildResponse (response)));
				}
			});
		}

		public void Send (Action<OUT> successCallback, Action<OUT> errorCallback, int timeoutSeconds)
		{
			if (this.request.MaxQueueTimeInSeconds == 0) {
				this.request.MaxQueueTimeInSeconds = timeoutSeconds;
			}
			if (this.request.MaxResponseTimeInSeconds == 0) {
				this.request.MaxResponseTimeInSeconds = timeoutSeconds;
			}
			this.request.Send (delegate (GSObject response) {
				if (successCallback != null) {
					successCallback ((OUT)((object)this.BuildResponse (response)));
				}
			}, delegate (GSObject response) {
				if (errorCallback != null) {
					errorCallback ((OUT)((object)this.BuildResponse (response)));
				}
			});
		}

		public IN SetMaxQueueTimeInSeconds (int maxQueueTime)
		{
			this.request.MaxQueueTimeInSeconds = maxQueueTime;
			return (IN)((object)this);
		}

		public IN SetMaxResponseTimeInSeconds (int maxResponseTime)
		{
			this.request.MaxResponseTimeInSeconds = maxResponseTime;
			return (IN)((object)this);
		}

 Any thoughts from the GS team?

 


Best Answer

Hi Davendra,


I recently made a post, and logged a ticket related to this exact issue....

https://support.gamesparks.net/support/discussions/topics/1000058778


I suggest you follow that thread too. 

1 Comment

Answer

Hi Davendra,


I recently made a post, and logged a ticket related to this exact issue....

https://support.gamesparks.net/support/discussions/topics/1000058778


I suggest you follow that thread too.