Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Jul 3, 2023
1 parent 37f6cd4 commit 8f3249c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bun.js/api/bun/socket.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ fn NewSocket(comptime ssl: bool) type {
}

fn writeMaybeCorked(this: *This, buffer: []const u8, is_end: bool) i32 {
if (this.socket.isShutdown() or this.socket.isClosed()) {
if (this.detached or this.socket.isShutdown() or this.socket.isClosed()) {
return -1;
}
// we don't cork yet but we might later
Expand All @@ -1583,7 +1583,6 @@ fn NewSocket(comptime ssl: bool) type {

fn writeOrEnd(this: *This, globalObject: *JSC.JSGlobalObject, args: []const JSC.JSValue, is_end: bool) WriteResult {
if (args.len == 0) return .{ .success = .{} };

if (args.ptr[0].asArrayBuffer(globalObject)) |array_buffer| {
var slice = array_buffer.slice();

Expand Down

0 comments on commit 8f3249c

Please sign in to comment.