Revision: 27861
          http://sourceforge.net/p/bibdesk/svn/27861
Author:   hofman
Date:     2022-09-06 23:24:18 +0000 (Tue, 06 Sep 2022)
Log Message:
-----------
no need to check for connection twice

Modified Paths:
--------------
    trunk/bibdesk/BDSKSharingServer.m

Modified: trunk/bibdesk/BDSKSharingServer.m
===================================================================
--- trunk/bibdesk/BDSKSharingServer.m   2022-09-06 23:15:14 UTC (rev 27860)
+++ trunk/bibdesk/BDSKSharingServer.m   2022-09-06 23:24:18 UTC (rev 27861)
@@ -679,19 +679,16 @@
     [connectedClients makeObjectsPerformSelector:@selector(invalidate)];
     [connectedClients removeAllObjects];
     [registeredClients removeAllObjects];
-    if ([self numberOfConnections] > 0){
+    if ([self numberOfConnections] > 0)
         [self setNumberOfConnections:0];
-    }
     
-    if (connection) {
-        NSPort *port = [[NSSocketPortNameServer sharedInstance] 
portForName:sharingName];
-        [[NSSocketPortNameServer sharedInstance] 
removePortForName:sharingName];
-        [port invalidate];
-        [connection setDelegate:nil];
-        [connection setRootObject:nil];
-        [connection invalidate];
-        BDSKDESTROY(connection);
-    }
+    NSPort *port = [[NSSocketPortNameServer sharedInstance] 
portForName:sharingName];
+    [[NSSocketPortNameServer sharedInstance] removePortForName:sharingName];
+    [port invalidate];
+    [connection setDelegate:nil];
+    [connection setRootObject:nil];
+    [connection invalidate];
+    BDSKDESTROY(connection);
 }
 
 #pragma mark | NSConnection delegate

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to