Skip to content

Tags: BEDLAM520/swift-nio

Tags

2.61.0

Toggle 2.61.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix exclusive access violation in `NIOAsyncChannelOutboundWriterHandl…

…er` (apple#2580)

# Motivation
We were setting `self.sink = nil` in the `NIOAsyncChannelOutboundWriterHandler` twice in the same call stack which is an exclusivity violation. This happens because the first `self.sink = nil` triggers the `didTerminate` delegate call which again triggered `self.sink = nil`.

# Modification
This PR changes the code to only call `self.sink?.finish()` and only sets the `sink` to `nil` in the `didTerminate` implementation. This follows what we do for the inbound handler implementation. I also added a test that triggers this exclusivity violation.

# Result
No more exclusivity violations in our code.

2.60.0

Toggle 2.60.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix thread-safety issues in TCPThroughputBenchmark (apple#2537)

Motivation:

Several thread-safety issues were missed in code review. This patch fixes them.

Modifications:

- Removed the use of an unstructured Task, replaced with eventLoop.execute to
  ServerHandler's EventLoop.
- Stopped ClientHandler reaching into the benchmark object without any
  synchronization, used promises and event loop hops instead.

Result:

Thread safety is back

2.59.0

Toggle 2.59.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Support for custom protocols in DatagramBootstrap (apple#2516)

Motivation

This patch adds support for custom protocol families to
DatagramBootstrap. In most cases this isn't useful, and will fail, but
in many OSes it's a recognised system for non-root processes to get a
way to send ICMP echo requests. This is worth supporting.

Modifications

- Expose the `ProtocolSubtype` type publicly.
- Add a `protocolSubtype` setter on `DatagramBootstrap`
- Write a test that actually does ICMP as non-root

Results

Users can send ICMP echo requests without root privileges.

2.58.0

Toggle 2.58.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Avoid using deinit to fulfil the protocol negotiation promise (apple#…

…2497)

# Motivation

Fixes apple#2494

# Modification
This PR avoids using `deinit` to fulfil the protocol negotiation promise and opts to trap instead when it is being accessed before the handler is added. This allows us to use `handlerAdded` and `handlerRemoved`.

# Result
No more `deinit` usage that can be observed.

2.57.0

Toggle 2.57.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Make `NIOAsyncChannel.Configuration` Sendable (apple#2466)

2.56.0

Toggle 2.56.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add configuration for `NIOAsyncChannel` (apple#2464)

# Motivation
While adopting the new `NIOAsyncChannel` type we saw an exploding number of parameters passed to the various connect/bind/configure methods. All these methods had in common that we had to pass configuration for the `NIOAsyncChannel`.

# Modification
This PR introduces a new type `NIOAsyncChannel.Configuration` which groups all four configuration parameters into a struct.

# Result
We can now write more concise methods that use a single configuration object.

2.55.0

Toggle 2.55.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix last remaining test on Android (apple#2457)

Motivation

Get all tests passing on Android AArch64

Modifications

- Check if localhost is set for IPv6 in BootstrapTest/testClientBindWorksOnSocketsBoundToEitherIPv4OrIPv6Only,
  and use ip6-localhost if not

Result

All tests pass natively on Android AArch64

2.54.0

Toggle 2.54.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Pooled control message storage. (apple#2422)

2.53.0

Toggle 2.53.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Tolerate sending data after close(mode: .output) (apple#2421)

Motivation

We shouldn't crash on somewhat likely user error.

Modifications

Pass on writes after close(mode: .output) instead of crashing.

Result

User code is more robust to weird edge cases.

2.52.0

Toggle 2.52.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add unprocessedBytes property on NIOSingleStepByteToMessageProcessor (a…

…pple#2419)