Add logging to ipc receiver (#1459)

* Add logging to ipc receiver

* Add to changelog
This commit is contained in:
raphCode 2022-06-07 17:14:22 +02:00 committed by GitHub
parent 6d15af04bd
commit 92c5c6cb03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
* feat: Log errors causing "empty message received from client" (https://github.com/zellij-org/zellij/pull/1459)
## [0.30.0] - 2022-06-07
* fix: right and middle clicks creating selection (https://github.com/zellij-org/zellij/pull/1372)

View file

@ -7,6 +7,7 @@ use crate::{
pane_size::{Size, SizeInPixels},
};
use interprocess::local_socket::LocalSocketStream;
use log::warn;
use nix::unistd::dup;
use serde::{Deserialize, Serialize};
use std::{
@ -189,7 +190,10 @@ where
pub fn recv(&mut self) -> Option<(T, ErrorContext)> {
match bincode::deserialize_from(&mut self.receiver) {
Ok(msg) => Some(msg),
Err(_) => None,
Err(e) => {
warn!("Error in IpcReceiver.recv(): {:?}", e);
None
}
}
}