* Clear the rate limiter or active connections.
()
| 75 | * Clear the rate limiter or active connections. |
| 76 | */ |
| 77 | disconnect(): Promise<void> { |
| 78 | return super.disconnect().then(() => { |
| 79 | // If the current instance is the master and the server is closing, |
| 80 | // demote and send the rate limiter of the current instance to the new master. |
| 81 | if (this.server.nodes.get('self').isMaster) { |
| 82 | this.server.discover.demote(); |
| 83 | this.server.discover.send('rate_limiter:limiters', this.rateLimiters); |
| 84 | } |
| 85 | }); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Send the stored rate limiters this instance currently have. |
nothing calls this directly
no test coverage detected