File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -152,14 +152,23 @@ impl WaylandClient {
152152 // wayland clients really aren't nice when disconnecting properly, are they? :p
153153 if let server:: Error :: Decode ( DecodeError :: IoError ( e) ) = & e {
154154 if e. kind( ) == io:: ErrorKind :: ConnectionReset {
155- tracing:: info!( "Wayland: Client disconnected from server" ) ;
155+ if let Some ( pid) = client. get:: <Display >( ObjectId :: DISPLAY ) . and_then( |d| d. pid) {
156+ tracing:: info!( "Wayland: Client with pid: {pid} disconnected from server" ) ;
157+ } else {
158+ tracing:: info!( "Wayland: Unknown client disconnected from server" ) ;
159+ }
156160 break ;
157161 }
158162 }
159163 tracing:: error!( "Wayland: Error reading message: {:?}" , e) ;
160164 break ;
161165 }
162166 Ok ( None ) => {
167+ if let Some ( pid) = client. get:: <Display >( ObjectId :: DISPLAY ) . and_then( |d| d. pid) {
168+ tracing:: info!( "Wayland: Client with pid: {pid} disconnected from server" ) ;
169+ } else {
170+ tracing:: info!( "Wayland: Unknown client disconnected from server" ) ;
171+ }
163172 // Message stream ended
164173 break ;
165174 }
You can’t perform that action at this time.
0 commit comments