We are attempting a Server communication with "HttpsURLConnection" object, where we have set the "connection" property of the request Object to "close" [setRequestProperty("Connection", "close")]. The above setting was working fine until in Android 9 OS in all devices, where as in some of the devices with Android 10 OS(Eg: Samsung A70 with Android 10) we are encountering an "java.net.ConnectException". When we remove our Connection property, the server communication got established and resolved the issue. I need your support in understanding the root-cause why there is a behavioral change in Android 10 OS and is there any impact by removing the connection object
url = new URL(reqURL);
httpsConnection = url.openConnection();
httpsConnection.setRequestMethod("POST");
httpsConnection.setRequestProperty("Content-Language", "en");
httpsConnection.setRequestProperty("Connection", "close");
httpsConnection.setRequestProperty("Content-Type","application/text");
OutputStream os = httpsConnection.getOutputStream();
os.write(cvmesgToServer.getBytes()) httpsConnection.connect();