diff options
author | Julien Dessaux | 2011-11-03 22:22:20 +0100 |
---|---|---|
committer | Julien Dessaux | 2011-11-03 22:22:20 +0100 |
commit | 899f76718f34761d4bc70354c67c508821a0e7c1 (patch) | |
tree | f21e878de5b840418baa3d9419b851351eb171bb /Hsbot | |
parent | Fixed the incorrect parsing of the TCP stream. (diff) | |
download | hsbot-899f76718f34761d4bc70354c67c508821a0e7c1.tar.gz hsbot-899f76718f34761d4bc70354c67c508821a0e7c1.tar.bz2 hsbot-899f76718f34761d4bc70354c67c508821a0e7c1.zip |
Fixed the fix to properly handle incomplete messages when there is nothing more to read.
Diffstat (limited to 'Hsbot')
-rw-r--r-- | Hsbot/Core.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs index 43276f9..d454c77 100644 --- a/Hsbot/Core.hs +++ b/Hsbot/Core.hs @@ -120,7 +120,7 @@ botReader env handle mctx chan = do errorM "Hsbot.Reader" $ "Reader decode error (" ++ show err ++ ") on " ++ str botTrueReader "" messages = do - msgs <- many1 message + msgs <- option [] $ many1 message trash <- option "" $ many1 anyChar return (msgs, trash) message = do |