Add logging to ipc receiver (#1459)
* Add logging to ipc receiver * Add to changelog
This commit is contained in:
parent
6d15af04bd
commit
92c5c6cb03
2 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue