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 |
||
|---|---|---|
| .. | ||
| NIOTSConnectionChannelTests.swift | ||
| NIOTSEndToEndTests.swift | ||
| NIOTSEventLoopTests.swift | ||
| NIOTSListenerChannelTests.swift | ||
| NIOTSSocketOptionTests.swift | ||
| NIOTSSocketOptionsOnChannelTests.swift | ||