diff --git a/Source/Port.m b/Source/Port.m index 6dd2e1419..e31d97f82 100644 --- a/Source/Port.m +++ b/Source/Port.m @@ -23,6 +23,7 @@ #include #include /* for Coding protocol in Object category */ +#include @implementation Port @@ -64,7 +65,13 @@ - (void) invalidate { - is_valid = NO; + if (is_valid) + { + [NotificationDispatcher + postNotificationName: PortBecameInvalidNotification + object: self]; + is_valid = NO; + } } - (Class) packetClass @@ -156,3 +163,5 @@ } @end + +NSString *PortBecameInvalidNotification = @"PortBecameInvalidNotification";