(ev: SrvPollingEvent)
| 358 | } |
| 359 | |
| 360 | private detectSrvRecords(ev: SrvPollingEvent) { |
| 361 | const previousTopologyDescription = this.s.description; |
| 362 | this.s.description = this.s.description.updateFromSrvPollingEvent( |
| 363 | ev, |
| 364 | this.s.options.srvMaxHosts |
| 365 | ); |
| 366 | if (this.s.description === previousTopologyDescription) { |
| 367 | // Nothing changed, so return |
| 368 | return; |
| 369 | } |
| 370 | |
| 371 | updateServers(this); |
| 372 | |
| 373 | this.emitAndLog( |
| 374 | Topology.TOPOLOGY_DESCRIPTION_CHANGED, |
| 375 | new TopologyDescriptionChangedEvent( |
| 376 | this.s.id, |
| 377 | previousTopologyDescription, |
| 378 | this.s.description |
| 379 | ) |
| 380 | ); |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * @returns A `TopologyDescription` for this topology |
no test coverage detected