conqp / rcon

Python RCON client library
GNU General Public License v3.0
84 stars 15 forks source link

make communicate functions thread safe #14

Closed gilesknap closed 1 year ago

gilesknap commented 2 years ago

This PR fixes issue #13

I'm afraid I don't have an easy way to write a unit test for this change.

But the system test using mcipc and the code in #13 does demonstrate that this works.

I could write a system test that runs minecraft in a container and tests parallel execution of commands if you are interested. I have such tests working well in mciwb.

gilesknap commented 2 years ago

Thanks for reviewing.

I agree re locking in the caller so will do a PR to mcipc instead.

conqp commented 1 year ago

Closing this, as consensus appears to be to let the caller worry about thread-safety.