users@grizzly.java.net

SSL + remote closing: bug.

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 26 Nov 2008 15:44:43 -0500

Salut,

Amy Kang wrote:
> Hi, Jeanfrancois,
>
> Thanks. I actually downloaded maven last night (I realized Grizzly uses
> maven)
> and built grizzly framework from trunk and tried following:
>
> kill remote client --> notified remotelyClosed
> remote connected but shutdown Grizzly on server side --> notified
> locallyClosed
>
> worked as expected for TCP (tried on Solaris), but for SSL, I didn't get
> notified.
> Maybe it's the way I setup SSL. The following is what I do for SSL setup,
>
> SSLSelectorHandler sslSelectorHandler = new SSLSelectorHandler();
> sslSelectorHandler.setPort(SSLPORT);
> controller.addSelectorHandler(sslSelectorHandler);
>
> Properties sslprops = _bc.getDefaultSSLContextConfig();
> SSLConfig sslcf = new SSLConfig(false);
> sslcf.setKeyStoreFile(sslprops.getProperty(_bc.KEYSTORE_FILE));
> .......
> SelectionKeyHandler keyHandler =
> sslSelectorHandler.getSelectionKeyHandler();
> if (keyHandler instanceof BaseSelectionKeyHandler) {
>
> ((BaseSelectionKeyHandler)keyHandler).setConnectionCloseHandler(this);
> }
> .....
>
> The only difference is for TCP I set BaseSelectionHandler explicitly ,
> for SSL I use
> what's default in SSLSelectorHandler.

That's a bug. The fix is coming.

Thanks for the hint!

-- Jeanfrancois