         case let .error(error):
             
             log?("Could not exchange MTU: \(error)")
+            self.connection = nil
             
         case let .value(pdu):
             

            
            log?("MTU Exchange (\(clientMTU) -> \(finalMTU))")
            
            self.connection?.maximumTransmissionUnit = finalMTU
        }
    }
    

        
        get { return connection?.writePending }
        
        set { connection?.writePending = newValue }
    }
    
    public private(set) var maximumTransmissionUnit: ATTMaximumTransmissionUnit = .default {
        
        // update connection with new value
        didSet { connection?.maximumTransmissionUnit = maximumTransmissionUnit }
    }
    
