diff --git a/quic.nimble b/quic.nimble index 0d6bdff..4b5d4cb 100644 --- a/quic.nimble +++ b/quic.nimble @@ -1,5 +1,5 @@ packageName = "quic" -version = "0.2.6" +version = "0.2.7" author = "Status Research & Development GmbH" description = "QUIC protocol implementation" license = "MIT" diff --git a/quic/transport/ngtcp2/stream/openstate.nim b/quic/transport/ngtcp2/stream/openstate.nim index 69191c4..b67066f 100644 --- a/quic/transport/ngtcp2/stream/openstate.nim +++ b/quic/transport/ngtcp2/stream/openstate.nim @@ -44,7 +44,8 @@ method read*(state: OpenStream): Future[seq[byte]] {.async.} = else: incomingFut.cancelSoon() let stream = state.stream.valueOr: - return + raise newException(StreamError, "stream is closed") + if state.frameSorter.isEOF(): stream.switch(newClosedStream(state.incoming, state.frameSorter))