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

Cosmetic change: The Reader thread can be named something more specific #739

Closed
wants to merge 2 commits into from

Conversation

kz282
Copy link

@kz282 kz282 commented Nov 4, 2021

Please see issue #738 .

After this change, the reader thread name can be matched to the thread that has started it. A simple grep will help if I need the details of one specific connection

2021-11-04 16:56:10.475 TRACE transport.TransportImpl(469) [SshTest 10.0.0.1 reader]: Received packet NEWKEYS
2021-11-04 16:56:10.491 DEBUG transport.KeyExchanger(402) [SshTest 10.0.0.1 reader]: Received SSH_MSG_NEWKEYS
2021-11-04 16:56:10.491 DEBUG concurrent.Promise(78) [SshTest 10.0.0.1 reader]: Setting <> to null
2021-11-04 16:56:10.491 DEBUG concurrent.Promise(78) [SshTest 10.0.0.1 reader]: Setting <> to SOME
2021-11-04 16:56:10.491 DEBUG sshj.SSHClient(807) [SshTest 10.0.0.1]: Key exchange took 0.219 seconds
2021-11-04 16:56:10.491 INFO sshtest.SshTest(120) [SshTest 10.0.0.1]: Trying AuthNone
2021-11-04 16:56:10.491 DEBUG concurrent.Promise(78) [SshTest 10.0.0.1]: Setting <> to null
2021-11-04 16:56:10.491 DEBUG transport.TransportImpl(328) [SshTest 10.0.0.1]: Sending SSH_MSG_SERVICE_REQUEST for ssh-userauth
2021-11-04 16:56:10.491 TRACE transport.Encoder(66) [SshTest 10.0.0.1]: Encoding packet #4: 05 00 00 00 0c 73 73 68 2d 75 73 65 72 61 75 74 68
2021-11-04 16:56:10.491 DEBUG concurrent.Promise(164) [SshTest 10.0.0.1]: Awaiting <>

@kz282 kz282 requested a review from hierynomus as a code owner November 4, 2021 18:17
@hierynomus
Copy link
Owner

I'm wondering, shouldn't we automatically set the reader thread to something better than the name reader. I'd rather do that than add more configuration options.

@exceptionfactory
Copy link
Contributor

I agree with @hierynomus that it would be helpful to select a sensible default value as opposed to making this property configurable. On a related note, it would also be helpful to do something similar for sftp reader and keep-alive thread names. Perhaps including the remote address and port number of the remote server would be a useful standard approach?

@exceptionfactory
Copy link
Contributor

See pull request #753 for an alternative approach to thread naming that also covers the SFTP PacketReader and KeepAlive Threads.

@hierynomus
Copy link
Owner

Superseeded by #753

@hierynomus hierynomus closed this Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants