grpc-proxy: Don't attempt to connect if there's no compositor running 15/29315/1
authorMarius Vlad <marius.vlad@collabora.com>
Fri, 27 Oct 2023 10:52:09 +0000 (13:52 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Fri, 27 Oct 2023 10:58:50 +0000 (13:58 +0300)
commit7ff5ed29cfe699d6b78bead843991fab9b956c7e
treec1204fed8231095bb53cfec2c6f44be83fafcc22
parent79f0ed38527fc9872cff6741a565980967818223
grpc-proxy: Don't attempt to connect if there's no compositor running

Commit d8e72099ecbcad, 'grpc-proxy: Terminate thread when we're
exiting', addressed a rather bigger issue to handle correctly the
shutdown/restart sequence. A consequence of that is the initial issue
opened in SPEC-4935 with a trace showing a protocol issue, due to fact
we're supplying an invalid wl_display without being connected to the
compositor.

While commit d8e72099ecbcad, 'grpc-proxy: Terminate thread when we're
exiting' does fix the issue and would make the underlying bug disappear
let's be more pedantic and don't attempt assume we have a compositor
connection when in fact we do not.

Bug-AGL: SPEC-4935
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id10dabe5178f52fa6a0cf6d70c70799c98f4b6d5
(cherry picked from commit 994d8a30b27f05516f6dc0a9f949315241cb9cc0)
grpc-proxy/main-grpc.cpp