Coder Social home page Coder Social logo

Bot freezes for unknown reasons about morse HOT 12 CLOSED

otann avatar otann commented on May 27, 2024
Bot freezes for unknown reasons

from morse.

Comments (12)

chiliec avatar chiliec commented on May 27, 2024 2

Okay, thanks, we believe in you!

from morse.

Otann avatar Otann commented on May 27, 2024

It looks like a duplicate of #31, there is a bug in clj-http that makes a call hang for an eternity.

In your code I recommend you to stop previous instance as well, you could be leaking memory with hanging threads.

from morse.

chiliec avatar chiliec commented on May 27, 2024
(defn -main
  [& args]
  (println "Bot running!")
  (go-loop [ch (p/start token bot-api)]
    (<! (timeout 5000))
    (if (nil? (<! ch))
      (do
        (println "Bot restarted")
        (p/stop ch)
        (recur (p/start token bot-api)))
      (recur ch)))
  (Thread/sleep Long/MAX_VALUE))

right?
and what to do with this bug? 🤕

from morse.

Otann avatar Otann commented on May 27, 2024

Yes, something like that!
Hold on tight, I'm working on it ;)

from morse.

Otann avatar Otann commented on May 27, 2024

@chiliec Just FYI, I've released 0.3.2 to Clojars that should fix this

from morse.

chiliec avatar chiliec commented on May 27, 2024

Now just stopped after start:

Jan 25, 2018 2:29:20 PM morse.polling invoke
SEVERE: HTTP request timed out, stopping polling

It seems behavior changed and example usage in readme need to be updated?

from morse.

Otann avatar Otann commented on May 27, 2024

@chiliec oooops, found a stupid bug where I used seconds instead if milliseconds
pushed 0.3.3 to clojars, would you be so kind to try again?

from morse.

chiliec avatar chiliec commented on May 27, 2024

If I set {timeout: 5000} than request timed out going away, but now enters to infinite loop (many answers).

from morse.

dixel avatar dixel commented on May 27, 2024

@chiliec @Otann I think it's not about the timeout but about the offset which is passed to telegram API, mb this would help? https://github.com/Otann/morse/pull/34/files

from morse.

chiliec avatar chiliec commented on May 27, 2024

@dixel thanks, it resolves my problem 👍

from morse.

Otann avatar Otann commented on May 27, 2024

Released 0.3.4

from morse.

chiliec avatar chiliec commented on May 27, 2024

Thanks!

from morse.

Related Issues (20)

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.