             if oldState == .awaitingAuth {
                 peer.connectAttemptFailAuthRejectCount += 1
             }
-            
             self.dispatch_on_delegate_queue({
                 self.membershipRosterDelegate?.peerConnectionAttemptFailed?(peer.role, peer: peer, isAuthRejection: oldState == .awaitingAuth)
             })
-        }
-
-        guard let lastService = peer.pickedResolvedService(), let hhaddresses = lastService.resolvedAddressInfo else {
-            DLog("socketDidDisconnect: not reannouncing, since last resolved service's resolvedAddressInfo is nil")
-            return
-        }
-        
-        if hhaddresses.count > 0 {
-            if abs(peer.lastReannounce.timeIntervalSinceNow) > 2.0 {
-                peer.lastReannounce = Date.init()
-                DLog("\(peer.displayName) socketDidDisconnect: re-announcing now")
-                self.announcePeer(peer: peer)
-            } else {
-                DLog("\(peer.displayName) socketDidDisconnect: NOT re-announcing, too quick")
-            }
-        } else {
-            DLog("\(peer.displayName) socketDidDisconnect: not reannouncing, since there are no addresses")
         }
     }
     

        }
        services = [HHService]()
    }
    fileprivate var lastReannounce = Date.init(timeIntervalSince1970: 0)
    open var keepaliveTimer: Timer?
    open var lastReceivedData: Date = Date.init(timeIntervalSince1970: 0)
    open var connectBlock: (()->Void)?
    open var customData: [String:AnyHashable]? // store your own data here. When a browser finds an advertiser and creates a peer for it, this will be filled out with the advertiser's customData *even before any connection occurs*. Note that while you can store values that are AnyHashable, only Strings are used as values for advertiser->browser connections.
    var connectCount=0, disconnectCount=0, connectAttemptFailCount=0, connectAttemptFailAuthRejectCount=0, dataRecvCount=0, dataSendCount=0
    override open var description: String {

                //                    self.stopBrowsing() // stop browsing once user has done something. Destroys all HHService except this one!
                
                if let oldSocket = peer.socket {
                    DLog("**** connect: PEER ALREADY HAD SOCKET, DESTROYING...")
                    oldSocket.synchronouslySetDelegate(nil)
                    oldSocket.disconnect()
                    peer.socket = nil
