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

build: close sftp connection when done #24593

Merged
merged 1 commit into from
Mar 27, 2022
Merged

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Mar 27, 2022

Some issue with the ppa sftp server makes it not close the connection when the client tries to terminate.

[user@work sftp]$ sftp -i ./ppakey geth-ci@ppa.launchpad.net
Connected to ppa.launchpad.net.
sftp> ls
sftp> exit
Interrupt  
Interrupt  
Interrupt  

More details

sftp> quit
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed
debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write])
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug3: send packet: type 96
debug2: channel 0: input drain -> closed
Interrupt  

Also seen here: kolban-google/sftp-gcs#23 (comment)
Pending fix here: mscdex/ssh2#1111

This PR fixes it, so that when we read the 'sftp> exit' command echoed back on stdout, we terminate on our side. This will cause the Wait to return an error, which we need to ignore to not CRIT the process.

@holiman holiman merged commit 0fffd3a into ethereum:master Mar 27, 2022
@holiman holiman added this to the 1.10.17 milestone Mar 27, 2022
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Apr 3, 2022
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
cp-wjhan pushed a commit to cp-yoonjin/go-wemix that referenced this pull request Nov 16, 2022
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.

1 participant