pymumble icon indicating copy to clipboard operation
pymumble copied to clipboard

Mumble.stop() not stopping thread

Open IntiValderas opened this issue 3 years ago • 3 comments

When disconnecting manually and trying to reconnect to mumble I receive the error that threads can only be started once. RuntimeError: threads can only be started once

mumble.stop() is excecuted properly, client is disconnecting as it should be. When I want to reconnect the client by using mumble.start() I get the error.

Not sure if it's a bug or if I'm doing something wrong here.

IntiValderas avatar May 24 '21 20:05 IntiValderas

mumble.stop() ask the mumble thread to stop, so it can take time (few second) cleaning all sounds and callbacks call. Related to https://github.com/azlux/pymumble/issues/38 , if the close() (Maybe renamed to disconnect() ) if the function you want, I can add it to the pymumble code. (I've forgot than @ArniDagur gave me some answer an this ticket)

azlux avatar May 24 '21 20:05 azlux

That doesn't seem to be working. I've managed to reconnect by using mumble.connect(). My code is capturing sound but the sound cannot be heard in the server it self. No errors are given just no sound that is being sent.

IntiValderas avatar May 24 '21 22:05 IntiValderas

Before calling start(), can you check the command self.mumble.is_alive() ? Once this function return False, you should be able to reconnect again without error.

In case it still not working, maybe you can share a part of you script, so we can check together.

azlux avatar May 26 '21 19:05 azlux