swift-nio-transport-services/Tests/NIOTransportServicesTests
Johannes Weiss 1d0cb1040e
don't retain everything until connect timeout expires (#30)
Motivation:

Previously we would use the combination of DispatchQueue.asyncAfter and
a DispatchWorkItem for the connect timeout. If the connection succeeded
we would just cancel the DispatchWorkItem. Unfortunately that will still
keep everything that's captured in the DispatchWorkItem alive until the
deadline has come (because DispatchWorkItem is just a dumb wrapper over
a closure).

Modifications:

use a DispatchSource of type timer source instead.

Result:

- we won't keep the ELG/EL/Channel/... alive until at least the connect
  timeout expires.
- fixes #28
2019-03-22 15:40:02 +00:00
..
NIOTSConnectionChannelTests.swift Prepare for convergence. (#27) 2019-03-15 14:48:05 +00:00
NIOTSEndToEndTests.swift don't retain everything until connect timeout expires (#30) 2019-03-22 15:40:02 +00:00
NIOTSEventLoopTests.swift don't retain everything until connect timeout expires (#30) 2019-03-22 15:40:02 +00:00
NIOTSListenerChannelTests.swift update to latest NIO 2 (#26) 2019-02-26 13:01:17 +00:00
NIOTSSocketOptionTests.swift update to latest NIO 2 (#26) 2019-02-26 13:01:17 +00:00
NIOTSSocketOptionsOnChannelTests.swift update to latest NIO 2 (#26) 2019-02-26 13:01:17 +00:00