Closed mvdbeek closed 7 years ago
Thanks, @mvdbee! Merging now.
Thanks a lot @carletes for the rapid review and merge! Can I also ask you to publish a new release to PyPI when you have some time ?
Can I also ask you to publish a new release to PyPI when you have some time?
Yep, I'll get to to it in the next few days.
I encountered an occasional deadlock when I was attempting to use mockssh using a real openssh client. I have observed that
self.command_queues[channel.chanid].get(block=True)
would block indefinitely and that the root of the problem appears to be that theself.command_queues
dictionary would be filled with the same key multiple times. Just checking if the key already exists solved the deadlock problem for me (but I'm not sure this is a good solution).I have included a unit test in 6a3025c that demonstrates this problem (I am running the test 5 times, since the problem does not always occur), if you revert 0dee748 the test should fail.
I am hoping you can include this PR or use the test case to find a better solution, as I would love to include MockSSH into another project for unit testing.