aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

( batcher ) Change 'Web Socket Connection error: Trying to work with closed connection' to info

Open MauroToscano opened this issue 1 year ago • 1 comments

MauroToscano avatar Jun 10 '24 16:06 MauroToscano

This log comes from ws library. For example

if let Err(e) = batcher.handle_new_block(block_number).await {
    error!("Error when handling new block: {:?}", e);
};

tungstenite/error.rs

    /// Trying to work with already closed connection.
    ///
    /// Trying to read or write after receiving `ConnectionClosed` causes this.
    ///
    /// As opposed to `ConnectionClosed`, this indicates your code tries to operate on the
    /// connection when it really shouldn't anymore, so this really indicates a programmer
    /// error on your part.
    #[error("Trying to work with closed connection")]
    AlreadyClosed,

If we change this to info, all errors from ws connection will be treated as info. I'm not sure if in rust we can exclude an speciific error

JuArce avatar Jun 11 '24 00:06 JuArce