From 1b5bb45ba2731a40f9c65a7c0bd3a28dcd841b3f Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Thu, 29 Feb 2024 22:21:11 +0200 Subject: [PATCH] remove debug logs from jetty --- .../java/com/ngrok/jetty/NgrokConnector.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/ngrok-jetty/src/main/java/com/ngrok/jetty/NgrokConnector.java b/ngrok-jetty/src/main/java/com/ngrok/jetty/NgrokConnector.java index a9caaad..70f857e 100644 --- a/ngrok-jetty/src/main/java/com/ngrok/jetty/NgrokConnector.java +++ b/ngrok-jetty/src/main/java/com/ngrok/jetty/NgrokConnector.java @@ -1,7 +1,5 @@ package com.ngrok.jetty; -import com.ngrok.Listener; -import com.ngrok.ListenerInfo; import com.ngrok.Session; import org.eclipse.jetty.http.HttpVersion; @@ -47,11 +45,6 @@ public NgrokConnector(Server server, Supplier sessionSupplier, Function protected void doStart() throws Exception { this.session = sessionSupplier.get(); this.listener = listenerFunction.apply(this.session); - if (this.listener instanceof ListenerInfo.Endpoint) { - var endpointInfo = (ListenerInfo.Endpoint) this.listener; - System.out.printf("URL: %s\n", endpointInfo.getUrl()); - } - super.doStart(); } @@ -64,14 +57,13 @@ protected void doStart() throws Exception { */ @Override protected void accept(int i) throws IOException, InterruptedException { - var nconn = listener.accept(); - System.out.printf("[%s] Accepted for %d\n", nconn.getRemoteAddr(), i); - var ep = new NgrokEndpoint(getScheduler(), nconn); + var ngrokConnection = listener.accept(); + var ep = new NgrokEndpoint(getScheduler(), ngrokConnection); - var conn = getDefaultConnectionFactory().newConnection(this, ep); - ep.setConnection(conn); + var connection = getDefaultConnectionFactory().newConnection(this, ep); + ep.setConnection(connection); - conn.onOpen(); + connection.onOpen(); } /**