Skip to content

Commit 9d9c889

Browse files
committed
Fix stream write terminates
1 parent a287471 commit 9d9c889

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Write _AWS Lambda_ functions in the Zig programming language to achieve blazing
2323

2424
### Benchmark
2525
Using zig allows creating small and fast functions.<br />
26-
Minimal [Hello World demo](#hello-world) on _`arm64` (256 MiB, Amazon Linux 2023)_:
26+
Minimal [Hello World demo](#hello-world) (_arm64_ 256 MiB, Amazon Linux 2023):
2727

2828
- ❄️ `~13ms` cold start invocation duration
2929
-`~1.5ms` warm invocation duration
@@ -38,7 +38,7 @@ Minimal [Hello World demo](#hello-world) on _`arm64` (256 MiB, Amazon Linux 2023
3838
## Quick Start
3939
1. Add a dependency to your project:
4040
```console
41-
zig fetch --save git+https://github.com/by-nir/aws-lambda-zig#0.2.0
41+
zig fetch --save git+https://github.com/by-nir/aws-lambda-zig#0.2.1
4242
```
4343
2. Configure the [executable build](#build-script):
4444
- Named the executable _bootstrap_.

src/runtime/handle.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub const Stream = struct {
105105
///
106106
/// If an error occurs, the stream is closed and the handler should return as soon as possible.
107107
pub fn write(self: Stream, payload: []const u8) Error!void {
108-
if (self.isActive()) return error.ClosedStream;
108+
if (!self.isActive()) return error.ClosedStream;
109109
self.stream.write(payload) catch return self.runtimeFailiure();
110110
}
111111

0 commit comments

Comments
 (0)