Recently found some different results on iOS 12 and iOS 14.
I have an application that is using NEPacketTunnelProvider
to establish a VPN tunnel with a remote server. The VPN tunnel is using NWUDPSession
and process the inbound packets with the
open func setReadHandler(_ handler: @escaping ([Data]?, Error?) -> Void, maxDatagrams: Int)
If I shutdown the remote VPN server, on iOS 12 an error will occur
Error Domain=NSPOSIXErrorDomain Code=89 "Operation canceled"
but on iOS 14+ there will be no such error happens.
Is this a bug in iOS 14+ compared with iOS 12?