marnicola / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

javax.net.ssl.SSLException: Write error: ssl=0x5c62dca0: I/O error during system call, Connection reset by peer #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.using https, setting all certificates trusted
2.using keep-alive, exception:
property=new HeaderProperty("Connection", "keep-alive");
headerList.add(0, property);
httpTransportSE.call(ACTION_SOAP_GetBranchListData, envelope, headerList);
property.setValue("close");
headerList.set(0, property);
3.The first visit is normal, about two or three minutes,visit again will 
exception "javax.net.ssl.SSLException: Write error: ssl=0x5c62dca0: I/O error 
during system call, Connection reset by peer" occur

What is the expected output? What do you see instead?
javax.net.ssl.SSLException: Write error: ssl=0x5c62dca0: I/O error during 
system call, Connection reset by peer

What version of the product are you using? On what operating system?
ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar

Please provide any additional information below.

Original issue reported on code.google.com by shixianm...@gmail.com on 17 Oct 2013 at 2:45

GoogleCodeExporter commented 9 years ago
This is still a problem in 3.1.1. It's caused by not calling 
connection.disconnect() in the httpTransportSE.call code.

The hack that worked for me was adding in a header property of "Connection : 
close". 
ArrayList<HeaderProperty> headerPropertyArrayList = new 
ArrayList<HeaderProperty>();
headerPropertyArrayList.add(new HeaderProperty("Connection", "close"));
And updating your call with ".call(SOAP_ACTION, envelope, 
headerPropertyArrayList)"

Original comment by islandma...@gmail.com on 29 Jan 2014 at 8:51

GoogleCodeExporter commented 9 years ago
Could you provide a pull request that fixes it in master

Original comment by mosa...@gmail.com on 29 Jan 2014 at 9:19