Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

JBIDE-18673 when livereload server is running browsersim/cordovasim should automatically enable livereload #38

Merged
merged 1 commit into from
Nov 19, 2014

Conversation

kmarmaliykov
Copy link
Contributor

if livereload server started - livereload enabled on browsersim start

@@ -446,6 +447,14 @@ private void overrideJsLogFunctions(IBrowser browser) {
+ "})();"); //$NON-NLS-1$
}

private void enableLivereloadIfAvailable() {
if (isLivereloadAvailable()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this not block if livereload is not available ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

livereload available = server started. So it doesn't blocks anything

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and what if the server is not available - how do we avoid it having to wait for a timeout of the connection ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just "ping" the server, if server is not started - we cannot establish connection(cannot get response code). So everything is OK

…hould automatically enable livereload

if livereload server started - livereload enabled on browsersim start
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants