Skip to content

Commit

Permalink
Merge pull request #45 from ngrok/nikolay/remove-debug-logs
Browse files Browse the repository at this point in the history
remove debug logs from jetty
  • Loading branch information
nikolay-ngrok committed Feb 29, 2024
2 parents 12fd978 + 1b5bb45 commit 9e8075f
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions ngrok-jetty/src/main/java/com/ngrok/jetty/NgrokConnector.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -47,11 +45,6 @@ public NgrokConnector(Server server, Supplier<Session> 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();
}

Expand All @@ -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();
}

/**
Expand Down

0 comments on commit 9e8075f

Please sign in to comment.