summaryrefslogtreecommitdiff
path: root/Hsbot/Core.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Hsbot/Core.hs')
-rw-r--r--Hsbot/Core.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs
index 670afa0..89f4471 100644
--- a/Hsbot/Core.hs
+++ b/Hsbot/Core.hs
@@ -41,8 +41,7 @@ initHsbot config = do
tlsenv <- initTLSEnv (configTLS config)
randomGen <- newGenIO :: IO SystemRandom
sCtx <- client tlsenv randomGen connhdl
- success <- handshake sCtx
- unless success $ errorM "Hsbot.Core" "TLS handshake failed" -- TODO: do some usefull error handling
+ handshake sCtx
return (Just tlsenv, Just sCtx))
else return (Nothing, Nothing)
return BotEnv { envBotState = botState
@@ -135,7 +134,7 @@ botReader env handle mctx chan = do
writeChan chan $ IncomingMsg msg
Nothing -> return ()
readThis :: Handle -> Maybe (TLSCtx Handle) -> IO String
- readThis _ (Just ctx) = fmap L.toString (recvData ctx)
+ readThis _ (Just ctx) = fmap L.toString (recvData' ctx)
readThis h Nothing = hGetLine h >>= \s -> return $ s ++ "\n"
botLoop :: Env IO ()