             if state != .Connecting {
                 if state == .Connected {
                     NSLog("%@", "connected to \(session.hashValue)")
+                    // Update the set of peers in the session
+                    peersInSession.insert(peerID)
+                    
                     // If currently a guest, stop looking for host
                     stopSearchingForHosts()
+                    
+                    // Pass to delegate
                     delegate?.connectedToPeer(peerID)
                 } else {
                     NSLog("%@", "not connected to \(session.hashValue)")

    private var serviceAdvertiser: MCNearbyServiceAdvertiser?
    private var serviceBrowser: MCNearbyServiceBrowser?
    private var foundHosts = [MCPeerID]()
    
    public weak var delegate: CoulombNetworkDelegate?
    

    public init(serviceType: String, deviceId: String) {
        self.serviceType = serviceType
        myPeerId = MCPeerID(displayName: deviceId)
        peersInSession = Set<MCPeerID>()
    }
    
    public convenience init(serviceType: String) {
