Sriharsha can validate this, but I think the reason is that if we allow
muting/unmuting at will (via those public APIs) that can completely mess up
the handshake itself. It should be possible to pause/resume the handshake
if that's what you'r elooking for but I'm not sure it is worth it for the
purposes of KIP-72 given the small volumes of reads/writes involved in
handshaking.

On Wed, Nov 2, 2016 at 4:24 PM, radai <[email protected]> wrote:

> Hi,
>
> as part of testing my code for KIP-72 (broker memory control), i ran into
> the following code snippet in SslTransportLayer:
>
>     public void removeInterestOps(int ops) {
>         if (!key.isValid())
>             throw new CancelledKeyException();
>         else if (!handshakeComplete)
>             throw new IllegalStateException("handshake is not completed");
>
>         key.interestOps(key.interestOps() & ~ops);
>     }
>
> why cant an ssl socket be muted before handshake is complete?
>

Reply via email to