Skip to content

Commit

Permalink
initialize storage.msg_namelen correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Aug 27, 2024
1 parent 460e04d commit 39cda2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/IORing/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public final class Message: @unchecked Sendable {
sockaddr_storage()
}
self.init(address: ss, buffer: buffer, flags: flags)
storage.msg_namelen = socklen_t(name?.count ?? MemoryLayout<sockaddr_storage>.size)
}

public convenience init(capacity: Int, flags: UInt32 = 0) {
Expand Down

0 comments on commit 39cda2d

Please sign in to comment.