switch (upgradeInfo.getStatus()) {
case SUCCESS:
final Connection grizzlyConnection = ctx.getConnection();
write(ctx, upgradeRequest, upgradeResponse);
final org.glassfish.tyrus.spi.Connection connection = upgradeInfo.createConnection(new GrizzlyWriter(ctx.getConnection()), new org.glassfish.tyrus.spi.Connection.CloseListener() {
@Override
public void close(CloseReason reason) {
grizzlyConnection.close();
}
});