You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
even though the connect documentation says that The connection socket is closed when done or in case of exceptions. this doesn't seem to happen with the tcpclient.
Here is code I used to reproduce based on the code in Readme.md:
module Main where
import Data.Function
import qualified Network.Monitoring.Riemann.Event as Event
import Network.Monitoring.Riemann.TCP
import Network.Monitoring.Riemann.Client
import Network.Monitoring.Riemann.TCPClient
import Control.Concurrent
main :: IO ()
main = doSend
doSend = do
c <- tcpClient "localhost" 5555
putStrLn "doing some IO work"
event <- pure $
Event.ok "my service"
& Event.description "my description"
& Event.metric (length [ "some data" ])
& Event.ttl 20
& Event.tags [ "tag1", "tag2" ]
sendEvent c event
putStrLn "do somethign else"
event <- pure $ Event.ok "my other service"
sendEvent c event
putStrLn "finished"
threadDelay 1000
close c
doSend
This exits after a while with the error simple-exe: Network.Socket.getAddrInfo: does not exist (System error) because there are too many open sockets (I checked with lsof -i ).
I'd be glad to fix this myself given some guidance.
The text was updated successfully, but these errors were encountered:
even though the connect documentation says that
The connection socket is closed when done or in case of exceptions.
this doesn't seem to happen with the tcpclient.Here is code I used to reproduce based on the code in Readme.md:
This exits after a while with the error
simple-exe: Network.Socket.getAddrInfo: does not exist (System error)
because there are too many open sockets (I checked withlsof -i
).I'd be glad to fix this myself given some guidance.
The text was updated successfully, but these errors were encountered: