if (profile != null && !matchesProfile(profile, tunnelDescriptor)) {
// Different credentials for the same profile, most likely
// meaning that a new tunnel was created, and the old profile
// has obsolete credentials.
if (profile.getConnectionState() == IConnectionProfile.CONNECTED_STATE) {
IStatus status = profile.disconnect();
if (!status.isOK()) {
CloudFoundryPlugin.log(status);
}
}