Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to remote debug (without socked timeout) while attached to Takes? #1091

Open
leroneb opened this issue Feb 5, 2021 · 0 comments

Comments

@leroneb
Copy link

leroneb commented Feb 5, 2021

Hi,

Overview:
I am making a mockserver using Takes, and I have been trying to figure out an issue with the client where we get 'Ghost' requests coming in. For instance
TkApp.java: TkFork tkFork = new TkFork( new FkRegex("/api/orders/review", new TkFork(new FkMethods("POST", new TkIndexToken()))), new FkRegex("/esb/resource/getaccesstoken", new TkFork(new FkMethods("POST", new TkIndexToken()))) );
And the client sends each request one after the other, but I print out the values of the headers of each request in my program, and takes prints out 4 sets of values instead of two.
1st header is getAccessToken and is 12 values in the header
2nd set of values doesn't say what request it is, and is 4 values in the header
3rd is review and has 12
4th is same as 2nd.

Question:
If you have any clue about the extra requests by all means let me know, but to try to figure it out, I set up remote debug port 1{port}, but after just 10 seconds, I get a sockettimeout exception. IN looking at takes code, I found L99 of FtBasic.java

@Override public void start(final Exit exit) throws IOException { this.socket.setSoTimeout((int) TimeUnit.SECONDS.toMillis(1L)); try { do { this.loop(this.socket); } while (!exit.ready()); } finally { this.socket.close(); } }

If I try changing 1L to something else just to see, the tests for the project hang and never finish. Is this what is timing out the debugging? And what can I do to fix it?

@0crat 0crat added the 0crat/new label Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants