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

Library hangs if SAMv3 doesn't add a newline to it's replies #10

Closed
mooseman1241 opened this issue Dec 28, 2021 · 1 comment
Closed

Comments

@mooseman1241
Copy link
Collaborator

If RESULT is not OK, SAM closes the connection without adding a newline byte. The library hangs when this happens. I believe this is caused by the line self.reader.read_line(&mut response)?. it doesn't find a \n byte so it keeps waiting until it finds one.

@mooseman1241
Copy link
Collaborator Author

I looked at i2pd's source code, and it does appear that every response should have a newline on it's end. For some reason though, the library hangs at self.reader.read_line(&mut response?) in Session::command() when the SAM command STREAM FORWARD... is executed. When I run that command over telnet it gets a reply almost instantly, so I don't believe it's from SAM just not responding.

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

No branches or pull requests

2 participants