diff --git a/Sources/OpenVPNAdapter/library/OpenVPNAdapter.mm b/Sources/OpenVPNAdapter/library/OpenVPNAdapter.mm index 62780e8..44bc498 100644 --- a/Sources/OpenVPNAdapter/library/OpenVPNAdapter.mm +++ b/Sources/OpenVPNAdapter/library/OpenVPNAdapter.mm @@ -87,6 +87,8 @@ } - (void)connectUsingPacketFlow:(id)packetFlow { + NSAssert(self.delegate != nil, @"delegate property shouldn't be nil, set it before trying to establish connection."); + self.packetFlowBridge.packetFlow = packetFlow; dispatch_queue_attr_t attributes = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_UTILITY, 0);