Revert ENOBUFS mitigation, do disconnect instead

Reverts #87 "fix"
This commit is contained in:
Davide De Rosa 2019-07-09 16:16:15 +02:00
parent ca517b3075
commit a4333eaafe
1 changed files with 0 additions and 7 deletions

View File

@ -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)