]> git.bitcoin.ninja Git - rust-lightning/commit
Keep the same read buffer unless the last message was overly large
authorMatt Corallo <git@bluematt.me>
Mon, 11 Oct 2021 05:03:45 +0000 (05:03 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 10 May 2022 23:40:20 +0000 (23:40 +0000)
commiteb17464e78ca3af0c80b5262b2d14fbebff40f10
tree7fca7918dec938efb1e955f68488eddc127811cf
parentae4ceb71a584f0aa9e0c1a14a6219d87f1668eba
Keep the same read buffer unless the last message was overly large

This avoids repeatedly deallocating-allocating a Vec for the peer
read buffer after every message/header.
lightning/src/ln/peer_handler.rs