--- a/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java Tue Feb 09 08:09:33 2010 -0600
+++ b/connectivity/com.nokia.tcf/src/com/nokia/tcf/impl/TCAPIConnection.java Wed Feb 10 13:33:18 2010 -0600
@@ -359,6 +359,23 @@
this.cookie.setConnected(true);
this.connection = inConnection;
this.messageOptions = inMessageOptions;
+ } else if (ret == TCErrorConstants.TCAPI_ERR_COMM_SERVER_RESPONSE_TIMEOUT){
+ // TCFServer may have died, attempt to restart it
+ ret = nativeStartServer();
+ if (ret == TCErrorConstants.TCAPI_ERR_NONE) {
+ // now try connecting again
+ ret = nativeConnect(type, options, settings, moptions, filePath, clientId);
+ if (ret == TCErrorConstants.TCAPI_ERR_NONE) {
+ this.cookie.setClientId(clientId[0]);
+ this.cookie.setConnected(true);
+ this.connection = inConnection;
+ this.messageOptions = inMessageOptions;
+ } else {
+ status = new Status(Status.ERROR, Activator.PLUGIN_ID, (int)ret, TCErrorConstants.getErrorMessage(ret), null);
+ }
+ } else {
+ status = new Status(Status.ERROR, Activator.PLUGIN_ID, (int)ret, TCErrorConstants.getErrorMessage(ret), null);
+ }
} else {
status = new Status(Status.ERROR, Activator.PLUGIN_ID, (int)ret, TCErrorConstants.getErrorMessage(ret), null);
}