Comments (12)
Okay, thanks, we believe in you!
from morse.
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.
(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.
Yes, something like that!
Hold on tight, I'm working on it ;)
from morse.
@chiliec Just FYI, I've released 0.3.2
to Clojars that should fix this
from morse.
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.
@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.
If I set {timeout: 5000}
than request timed out going away, but now enters to infinite loop (many answers).
from morse.
@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.
@dixel thanks, it resolves my problem
from morse.
Released 0.3.4
from morse.
Thanks!
from morse.
Related Issues (20)
- Support /command@YourBot style commands HOT 3
- Exception causes long polling process shutdown HOT 2
- Don't leak dev-time dependencies HOT 3
- Not reconnected after 502 error HOT 4
- `polling/start` cannot signal when the updates channel is closed HOT 10
- Is it possible to pass a core.async channel to the "start" function in polling to get the updates directly into it? HOT 7
- Global timeout outside of clj-http for getting updates in the polling process. HOT 1
- Got HTTP request timed out HOT 2
- pooling started, but not working HOT 3
- Update handler HOT 1
- no delete-webhook function.
- Long-polling HTTP request timed out, stopping polling HOT 8
- Infinite loop with web hook HOT 1
- Handle upgrading a group to supergroup HOT 3
- Longpolling: Does not survive random 502 from Telegram HOT 3
- inline query did not check if update is a inline query
- 403 Forbidden: bot was blocked by the user HOT 4
- hellonico/morse 0.2.4 ? HOT 1
- Message is sent but throws an exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from morse.