public void waitForConnect(long timeout, TimeUnit unit) {
        try {
            this.listener.connectFuture().get(timeout, unit);
        } catch (ExecutionException | TimeoutException | InterruptedException e) {
            throw new RuntimeException("Timed out waiting to socket to connect", e);
        }
    }
Waits the specified amount of time for the socket to connect,
before throwing an exception if a timeout occurs.

@param timeout the timeout
@param unit the timeout unit
common/src/main/java/me/lucko/luckperms/common/webeditor/socket/WebEditorSocket.java