| | |
| | | import static org.opends.server.util.ServerConstants.OID_START_TLS_REQUEST; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.InetAddress; |
| | | import java.nio.channels.ClosedChannelException; |
| | | import java.nio.channels.Selector; |
| | |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | |
| | | import javax.net.ssl.SSLEngine; |
| | | import javax.net.ssl.SSLException; |
| | | import javax.net.ssl.SSLPeerUnverifiedException; |
| | | import javax.net.ssl.SSLSession; |
| | | import javax.security.sasl.SaslServer; |
| | |
| | | if (error instanceof LocalizableException) { |
| | | disconnect( |
| | | DisconnectReason.PROTOCOL_ERROR, true, ((LocalizableException) error).getMessageObject()); |
| | | |
| | | } else { |
| | | disconnect(DisconnectReason.PROTOCOL_ERROR, true, null); |
| | | disconnect(DisconnectReason.PROTOCOL_ERROR, (!(error instanceof IOException)), null); |
| | | } |
| | | } |
| | | |
| | |
| | | // See if we should send a notification to the client. If so, then |
| | | // construct and send a notice of disconnection unsolicited |
| | | // response. Note that we cannot send this notification to an LDAPv2 client. |
| | | if (sendNotification && ldapVersion != 2) { |
| | | if (sendNotification && ldapVersion != 2 && !clientContext.isClosed()) { |
| | | try { |
| | | LocalizableMessage errMsg = message != null ? message |
| | | : INFO_LDAP_CLIENT_GENERIC_NOTICE_OF_DISCONNECTION.get(); |