liujianguang/ksoap2-android

Unnecessary calls to connection.connect() on HttpTransportSE

Closed this issue · 2 comments


We have calls to method connection.connect() in lines 136 and 149 on class 
HttpTransportSE. These are unnecessary as the connection is actually open in 
the call to the method getServiceConnection().

If we remove both calls then the project is not passing the test 
HttpTransportSETest, due to an error in the Mock class 
ServiceConnectionFixture, as the flag connected is only being set to true when 
we call the method connect.

The test case can be easily fixed by seting the flag to true in the 
constructor. Same Behavior than in class ServiceConnectionSE.







Original issue reported on code.google.com by jose.cas...@gmail.com on 26 May 2012 at 3:02

Feel free to provide another pull request and test if you idea works... also if 
that is the case it might need to be fixed for the other transports. 


Original comment by mosa...@gmail.com on 26 May 2012 at 4:59

Fixed with https://github.com/mosabua/ksoap2-android/pull/20/ and released with 
2.6.5

Original comment by mosa...@gmail.com on 31 May 2012 at 11:53

  • Changed state: Fixed