Java Question [SERVER] GET request

Status
Not open for further replies.

jesuslizonsoluciones

Member
Licensed User
Longtime User
Hi all


I have a question which is the following:


I am using Jserver in a server application; everything works correctly for me until I make a GET request from outside; it closes without having finished the process.


This happens to me especially when I am waiting for some internal process to finish with the waitford command


Is there an example where I can look at the GET process ????


I use jserver and the GET requests are made from the POSTMAN program


Greetings and thank you
 

alwaysbusy

Expert
Licensed User
Longtime User
If you suspect it is because of a Timeout, you can try this after the srvr.Start:

B4X:
Dim jo As JavaObject = srvr
Dim connectors() As Object = jo.GetFieldJO("server").RunMethod("getConnectors", Null)
' timeoutMs MUST be a long
Dim timeoutMs As Long = 30000 ' is 30 seconds
For Each c As JavaObject In connectors
        c.RunMethod("setIdleTimeout", Array(timeoutMs))
Next

Alwaysbusy
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…