Skip to content

Commit

Permalink
Include newline character in Socket request messages
Browse files Browse the repository at this point in the history
New-line characters are a required delimiter for ElectrumX JSON-RPC
messages.
This will not impact Blockbook messages; it's backwards compatible.
  • Loading branch information
samholmes committed May 9, 2024
1 parent 907be98 commit 0cc795c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/utxobased/network/Socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export function makeSocket(uri: string, config: SocketConfig): Socket {
method: request.task.method,
params: request.task.params ?? {}
}
socket.send(JSON.stringify(message))
socket.send(JSON.stringify(message) + '\n')
}
}

Expand Down

0 comments on commit 0cc795c

Please sign in to comment.