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

connection.send/receive calls in open.py do not use timeouts #161

Open
linuskr opened this issue Jan 17, 2022 · 1 comment
Open

connection.send/receive calls in open.py do not use timeouts #161

linuskr opened this issue Jan 17, 2022 · 1 comment

Comments

@linuskr
Copy link
Contributor

linuskr commented Jan 17, 2022

Since there is no timeout set, these calls wait indefinitely if the server does not respond for some reason.

@jborean93
Copy link
Owner

Unfortunately this is somewhat as designed as one of the original purposes of making this library was to create a PSExec like tool in Python. One of the functions of this was to connect to a named pipe and continuously read from the pipe as data was available. This means that the client could be waiting for a long time if there was no output so a timeout didn't make sense. That doesn't mean there couldn't be an explicit timeout argument added to control such a thing. There is also arguably a hackish way to do this today by setting send=False and calling connection.receive(...) with your own timeout but this is pretty hackish.

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