Mir

Merge lp:~vanvugt/mir/log-dropped into lp:mir

Proposed by Daniel van Vugt
Status: Work in progress
Proposed branch: lp:~vanvugt/mir/log-dropped
Merge into: lp:mir
Diff against target: 21 lines (+4/-0)
1 file modified
src/server/frontend/session_mediator.cpp (+4/-0)
To merge this branch: bzr merge lp:~vanvugt/mir/log-dropped
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Abstain
Review via email: mp+272075@code.launchpad.net

Commit message

Add a log warning message about clients that die unexpectedly.

We do have the session mediator report doing the same thing, but most of
the time that's not enabled.

Description of the change

A useful and probably infrequent log message... On a related note I have a theory we're leaking/bloating some bufferstream/surface related resources when this happens (see bug 1495871).

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I'd rather get the default reporting right than add log messages to compensate.

review: Abstain
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

2961. By Daniel van Vugt

Add a log warning message about clients that die unexpectedly.

We do have the session mediator report doing the same thing, but most of
the time that's not enabled.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/frontend/session_mediator.cpp'
2--- src/server/frontend/session_mediator.cpp 2015-09-21 11:31:49 +0000
3+++ src/server/frontend/session_mediator.cpp 2015-09-23 10:08:00 +0000
4@@ -46,6 +46,7 @@
5 #include "mir/frontend/buffer_stream.h"
6 #include "mir/scene/prompt_session_creation_parameters.h"
7 #include "mir/fd.h"
8+#include "mir/log.h"
9
10 #include "mir/geometry/rectangles.h"
11 #include "buffer_stream_tracker.h"
12@@ -105,6 +106,9 @@
13 {
14 if (auto session = weak_session.lock())
15 {
16+ mir::log_warning("Session `%s' connection dropped without disconnect "
17+ "(client crashed?)",
18+ session->name().c_str());
19 report->session_error(session->name(), __PRETTY_FUNCTION__, "connection dropped without disconnect");
20 shell->close_session(session);
21 }

Subscribers

People subscribed via source and target branches