Comments (6)
To make a duplex from a pipe, this is used:
pipeDuplex
:: Handle -- ^ Read
-> Handle -- ^ Write
-> Duplex IO IO CBOR.Encoding BS.ByteString
pipeDuplex hndRead hndWrite = uniformDuplex send recv
where
send = \encoding -> do
BS.hPutBuilder hndWrite (CBOR.toBuilder encoding)
hFlush hndWrite
recv = do
chunk <- BS.hGetSome hndRead LBS.smallChunkSize
-- chunk will be null only if EOF (confirm?)
pure $ if BS.null chunk then Nothing else Just chunk
So the receive side closes up at the first BS.null
chunk delivered. Maybe this is wrong?
from ouroboros-network.
I've changed it to always give Just chunk
, so that the pipeDuplex
receive side never closes. The 10000 quickcheck iterations would always show the bug for me, but with this change it hasn't come up.
from ouroboros-network.
from ouroboros-network.
Seems to be fixed
from ouroboros-network.
This happened again on an unrelated PR, I think it's not yet resolved.
from ouroboros-network.
Closing, this hasn't occurred for almost a year now.
from ouroboros-network.
Related Issues (20)
- Inform Consensus Layer whether a bootstrap peer should be considered remote HOT 6
- cardano-ping crashes when encountering unknown versions HOT 1
- Refactor 'any Cold async demotion test'
- Ledger peers progresses towards known target (from below) test failure
- 8.9.1 cardano-cardano nodes have zero peers to share.
- Outbound Governor Counters
- Remove MsgNoBlock from the state machine diagram HOT 1
- Introduce support for Genesis and big ledger peer snapshot data
- Borken subscription test HOT 1
- Introduce PeerSelectionCounters in PeerSelectionState record HOT 1
- Write micro-benchmarks for `PeerSelectionCounters`
- Clean up testnet properties
- Factor out common parts in accPoolStake and accumulatebigLedgerStake
- Genesis Mode for outbound connection state
- cardano-cli ping: Wrong exit code on magic ID mismatch
- cardano-cli ping: Reduce TCP timeout or add timeout option
- Default configuration values
- Test
- Extend support for peer selection governor tests with TimedScript not restricted to NoDelay/ShortDelay's
- Test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ouroboros-network.