mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
Remove timer hack from king<->serf protocol (should be fixed?)
This commit is contained in:
parent
2a5f2a2d6e
commit
acdd9b82f5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user