Giter Site home page Giter Site logo

Comments (3)

CaileanWilkinson avatar CaileanWilkinson commented on June 15, 2024

Thanks for letting me know! I have just pushed an update which I hope fixes this problem.

stop_listening() previously closed and reopened the usb connection, the theory being that this would force the thread listening to it to raise an exception and stop waiting for a response, so we could make it quit. I suspect (hope) the closing and reopening was happening too quickly to interrupt the listener process and so wasn't quitting properly.

The new version throws the whole connection away and starts a new one (which the listener thread won't have a reference to) and so now there should be no connection left for the listener thread to respond to.

I don't have a windows pc to test this on, so please let me know if it works.

from pybuzzers.

irukard avatar irukard commented on June 15, 2024

Unfortunately adding self.__interface = hid.device() doesn't solve the problem.
I suppose the implementation of hidapi on windows is quite different than on linux/mac.

from pybuzzers.

CaileanWilkinson avatar CaileanWilkinson commented on June 15, 2024

It is possible that hidapi does not raise the same exception when a read fails on windows as it does on Mac, or that when the connection is closed the read fails gracefully without raising an exception. I'll have to try it on a windows pc and have a look.

from pybuzzers.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.