 	public func disconnected(connection: WebSocketConnection, reason: WebSocketCloseReasonCode) {
 		Log.info("[Server] disconnected gossip \(connection.id); reason=\(reason)")
 		self.mutex.locked {
-			self.gossipConnections.removeValue(forKey: connection.id)
+			if let pic = self.gossipConnections[connection.id] {
+				pic.disconnected()
+				self.gossipConnections.removeValue(forKey: connection.id)
+			}
 		}
 	}
 

			Log.debug("Advance peer \(url) from state \(self.state)")
			do {
				if let n = node {
					switch self.state {
					case .failed(error: _, at: let date):
						// Failed peers become 'new' after a certain amount of time, so we can retry

		if !self.connection.isConnected {
			self.connection.connect()
		}
	}

	public override func send(data: Data) throws {
