[NO ISSUE][NET] Ensure ssl socket is connected before write
authorMurtadha Hubail <mhubail@apache.org>
Thu, 4 Feb 2021 16:58:47 +0000 (19:58 +0300)
committerMurtadha Hubail <mhubail@apache.org>
Fri, 5 Feb 2021 16:42:51 +0000 (16:42 +0000)
commit0dbb0c2c39639262068bdaa8bb6d571fadb3f1da
tree89974b3e15d48883829a3d9fbf09964b4e939bca
parent9f19cef6bb20a20173f6fe2ba14127ba8bf5a7e6
[NO ISSUE][NET] Ensure ssl socket is connected before write

- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- Ensure the SSL socket is connected before attempting a
  write/wrap operation.
- Only attempt to send goodbye message to replicas when
  the socket channel is still connected.
- Always attempt to close the ssl socket channel even when
  the close handshake fails.

Change-Id: I07fbcd76be29853c94cb133485d83034ceee9cb3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/9825
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/api/PartitionReplica.java
hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/sockets/SslSocketChannel.java