7a2b53d987
This is needed for two reasons: the first is that onOpen() is called from the selector thread and onConnect() may perform I/O (such as sending a SETTINGS frame), and second because onOpen() may be called when NPN upgrades the connection. In the latter case, SslConnection is busy with the SSL handshake (for example is filling) and calling onConnect() triggers a write, that ends up in the SslConnection that sees that it is still in the SSL handshake and needs to fill, resulting in a reentrant fill, which is not supported correctly by SslConnection. Dispatching to a new thread makes the call safe, since SslConnection is properly synchronized. |
||
---|---|---|
.. | ||
src | ||
pom.xml |