Simplify handleClose
@@ -285,18 +285,18 @@ protected void handleClose(boolean user_canceled)
{
this.closed = true;
- if (user_canceled && !appDataReady)
+ if (!appDataReady)
+ {
+ cleanupHandshake();
+
+ if (user_canceled)
{
raiseAlertWarning(AlertDescription.user_canceled, "User canceled handshake");
}
+ }
raiseAlertWarning(AlertDescription.close_notify, "Connection closed");
- if (!appDataReady)
- {
- cleanupHandshake();
- }
-
closeConnection();
}
}
