// Could have been closed during the handshake.
if (status.equals(Socket.STATUS.CLOSE) || status.equals(Socket.STATUS.ERROR)) return;
closed.set(false);
Event newStatus = status.equals(Socket.STATUS.INIT) ? OPEN : REOPENED;
status = Socket.STATUS.OPEN;
TransportsUtil.invokeFunction(newStatus,
decoders, functions, String.class, newStatus.name(), newStatus.name(), resolver);
}