diff --git a/htools/Ganeti/Luxi.hs b/htools/Ganeti/Luxi.hs index ff3989239d8acbb9483a45951a236243f8f7e24f..9e5b3370fc9e1401359224c9d906f91ab2c36b76 100644 --- a/htools/Ganeti/Luxi.hs +++ b/htools/Ganeti/Luxi.hs @@ -55,7 +55,9 @@ module Ganeti.Luxi import Control.Exception (catch) import Data.IORef import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.UTF8 as UTF8 +import qualified Data.ByteString.Lazy.UTF8 as UTF8L import Data.Word (Word8) import Control.Monad import Text.JSON (encodeStrict, decodeStrict) @@ -245,9 +247,9 @@ closeClient = hClose . socket -- | Sends a message over a luxi transport. sendMsg :: Client -> String -> IO () sendMsg s buf = withTimeout luxiDefRwto "sending luxi message" $ do - let encoded = UTF8.fromString buf + let encoded = UTF8L.fromString buf handle = socket s - B.hPut handle encoded + BL.hPut handle encoded B.hPut handle bEOM hFlush handle