Merge branch '2.1.x'
Closes gh-18682
This commit is contained in:
@@ -68,7 +68,9 @@ class Connection {
|
||||
this.inputStream = new ConnectionInputStream(inputStream);
|
||||
this.outputStream = new ConnectionOutputStream(outputStream);
|
||||
this.header = this.inputStream.readHeader();
|
||||
logger.debug("Established livereload connection [" + this.header + "]");
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Established livereload connection [" + this.header + "]");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,7 +109,9 @@ class Connection {
|
||||
throw new ConnectionClosedException();
|
||||
}
|
||||
else if (frame.getType() == Frame.Type.TEXT) {
|
||||
logger.debug("Received LiveReload text frame " + frame);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received LiveReload text frame " + frame);
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new IOException("Unexpected Frame Type " + frame.getType());
|
||||
|
||||
@@ -109,7 +109,9 @@ public class LiveReloadServer {
|
||||
public int start() throws IOException {
|
||||
synchronized (this.monitor) {
|
||||
Assert.state(!isStarted(), "Server already started");
|
||||
logger.debug("Starting live reload server on port " + this.port);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Starting live reload server on port " + this.port);
|
||||
}
|
||||
this.serverSocket = new ServerSocket(this.port);
|
||||
int localPort = this.serverSocket.getLocalPort();
|
||||
this.listenThread = this.threadFactory.newThread(this::acceptConnections);
|
||||
|
||||
Reference in New Issue
Block a user