From acdd9b82f5e9e53cccec64b295a463cc8076e1c5 Mon Sep 17 00:00:00 2001 From: Benjamin Summers Date: Thu, 12 Dec 2019 19:01:24 -0800 Subject: [PATCH] Remove timer hack from king<->serf protocol (should be fixed?) --- pkg/king/lib/Vere/Serf.hs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkg/king/lib/Vere/Serf.hs b/pkg/king/lib/Vere/Serf.hs index 1800beedb..9139008b5 100644 --- a/pkg/king/lib/Vere/Serf.hs +++ b/pkg/king/lib/Vere/Serf.hs @@ -237,22 +237,13 @@ sendOrder w o = do sendBytes :: HasLogFunc e => Serf e -> ByteString -> RIO e () sendBytes s bs = handle ioErr $ do sendLen s (length bs) - hFlush (sendHandle s) - - hack - hPut (sendHandle s) bs hFlush (sendHandle s) - hack - where ioErr :: IOError -> RIO e () ioErr _ = throwIO SerfConnectionClosed - -- TODO WHY DOES THIS MATTER????? - hack = threadDelay 10000 - recvLen :: (MonadIO m, HasLogFunc e) => Serf e -> m Word64 recvLen w = io $ do bs <- hGet (recvHandle w) 8