Hi there. We have a setup where whenever someone begins streaming to Wowza, it checks the stream name with our webserver. This request is set up so that if the webserver is down, Wowza will let them stream.
The problem is that if the webserver handles the request very slowly, the encoder (FMLE) gives up before Wowza gives up trying to connect to the webserver, and FMLE stops trying to connect to Wowza, failing with an error message. I added in a 30 second delay to my webserver to test this.
How can I set a timeout setting on HTTPUtils.HTTPRequestToByteArray?
Here is the code that connects to the webserver:
public static Boolean requestPublish( String pingParams )
Boolean streamAllowed = false;
// Send the request to the website to make sure that the password part of the stream is correct.
byte resp = HTTPUtils.HTTPRequestToByteArray("http://www." + baseDomain + "/webserver/url", "POST", pingParams, null);
String response = new String(resp, "UTF-8");
if ( response.indexOf("true") >= 0 ) streamAllowed = true;
log.error("HscFunc: Failed to check password.");
streamAllowed = true;