This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-15
Channels
- # aleph (9)
- # announcements (6)
- # beginners (42)
- # calva (4)
- # cider (9)
- # clara (2)
- # clj-kondo (1)
- # cljdoc (108)
- # cljs-dev (10)
- # clojure (25)
- # clojure-brasil (1)
- # clojure-chicago (1)
- # clojure-europe (4)
- # clojure-italy (42)
- # clojure-nl (14)
- # clojure-uk (66)
- # clojurebridge (3)
- # clojurescript (23)
- # clojutre (2)
- # community-development (1)
- # cursive (2)
- # datomic (4)
- # figwheel-main (21)
- # fulcro (23)
- # jobs-discuss (1)
- # kaocha (1)
- # off-topic (10)
- # pedestal (4)
- # reitit (2)
- # shadow-cljs (41)
- # spacemacs (7)
- # sql (20)
- # xtdb (3)
@runeb dyu mean you added a :timeout
to the fast-echo-handler
example s/connect
?
@mccraigmccraig yes, precisely. I think the response from @hiredman explains perfectly why I did not see what I initially expected (timeout when lack of incoming data). If timeout is meant to address the tcp layer it makes sense.
manifold.stream/connect :timeout
doesn't address the tcp layer... it's timing out a connection between streams, which in the case of the fast-echo-handler
is a connection between the rx and tx sides of the tcp socket, but it's not a tcp layer timeout
@mccraigmccraig hmmm in my test case outlined originally (connecting to the handler by way of telnet). Should I expect to see a disconnect from said time out in case I dont touch the keyboard?
no, i don't think so - the only thing being disconnected is the connection between the two streams based on the underlying socket channels - i don't think stream/connect :timeout
closes its source or sink
do you observe that it stops echoing after the timeout?
They dont close as far as i cant tell. I set the flags for closing also. I would like to see a disconnect on the telnet side. I need to kick clients that are not chatting for some set period and thought timeout was the answer. I made a watchdog to check "chattiness" of each connection and closing those that fail the timeout threshold. I am curious if this is the expected way of handling such conditions. I am not so sure what benefit I get from the current behavior of timeout? To set tcp socket timeout pr connection instead of on a system level? Do you know?
can you show some code @runeb? easier to understand then...