From a4333eaafe33bf88c3b2ec3a3b8c4a5ceba9203e Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Tue, 9 Jul 2019 16:16:15 +0200 Subject: [PATCH] Revert ENOBUFS mitigation, do disconnect instead Reverts #87 "fix" --- TunnelKit/Sources/Protocols/OpenVPN/OpenVPNSession.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/TunnelKit/Sources/Protocols/OpenVPN/OpenVPNSession.swift b/TunnelKit/Sources/Protocols/OpenVPN/OpenVPNSession.swift index eee79f7..6c32d3e 100644 --- a/TunnelKit/Sources/Protocols/OpenVPN/OpenVPNSession.swift +++ b/TunnelKit/Sources/Protocols/OpenVPN/OpenVPNSession.swift @@ -1133,13 +1133,6 @@ public class OpenVPNSession: Session { controlChannel.addSentDataCount(encryptedPackets.flatCount) link?.writePackets(encryptedPackets) { [weak self] (error) in if let error = error { - - // try mitigating "No buffer space available" - if let posixError = error as? POSIXError, posixError.code == POSIXErrorCode.ENOBUFS { - log.warning("Data: Packets dropped, no buffer space available") - return - } - self?.queue.sync { log.error("Data: Failed LINK write during send data: \(error)") self?.deferStop(.shutdown, OpenVPNError.failedLinkWrite)