mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 08:07:25 +02:00
lnrpc+itest: fix write deadline issue with WS ping
Fixes #5680. To make sure we're always reading from the WebSocket connection, we need to always have an ongoing (but blocking) conn.ReadMessage() call going on. To achieve this, we do the read in a separate goroutine and write to a buffered channel. That way we can always read the next message while the current one is being forwarded. This allows incoming ping messages to be received and processed which then leads to the deadlines to be extended correctly.
This commit is contained in:
@@ -324,6 +324,12 @@ you.
|
||||
* [Fix crash with empty AMP or MPP record in
|
||||
invoice](https://github.com/lightningnetwork/lnd/pull/5743).
|
||||
|
||||
* The underlying gRPC connection of a WebSocket is now [properly closed when the
|
||||
WebSocket end of a connection is
|
||||
closed](https://github.com/lightningnetwork/lnd/pull/5683). A bug with the
|
||||
write deadline that caused connections to suddenly break was also fixed in the
|
||||
same PR.
|
||||
|
||||
## Documentation
|
||||
|
||||
The [code contribution guidelines have been updated to mention the new
|
||||
|
Reference in New Issue
Block a user