Merge pull request #3230 from urbit/pp/ames-slow-startup

king: ames: add stderr when sending before having turfs
This commit is contained in:
pilfer-pandex 2020-08-10 17:47:43 -07:00 committed by GitHub
commit 8e04cd12f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,7 +229,7 @@ ames env who isFake enqueueEv stderr = (initialEvents, runAmes)
NewtEfSend (_id, ()) dest (MkBytes bs) -> do
atomically (readTVar aTurfs) >>= \case
Nothing -> pure ()
Nothing -> stderr "ames: send before turfs" >> pure ()
Just turfs -> sendPacket drv mode dest bs
sendPacket :: AmesDrv -> NetworkMode -> AmesDest -> ByteString -> RIO e ()