Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/xrpl/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr

## Unreleased

### Fixed
* Fix event listener accumulation bug where `'connected'` event handlers would fire multiple times after each reconnection. Changed `.on()` to `.once()` in the Client constructor's reconnect handler to prevent listener accumulation.

## 4.6.0 (2026-02-12)

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/xrpl/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class Client extends EventEmitter<EventTypes> {
})

this.connection.on('reconnect', () => {
this.connection.on('connected', () => this.emit('connected'))
this.connection.once('connected', () => this.emit('connected'))
})

this.connection.on('disconnected', (code: number) => {
Expand Down
Loading