diff options
Diffstat (limited to 'lib/gibber/gibber-bytestream-direct.c')
-rw-r--r-- | lib/gibber/gibber-bytestream-direct.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gibber/gibber-bytestream-direct.c b/lib/gibber/gibber-bytestream-direct.c index 772b05e8..dc3c6a61 100644 --- a/lib/gibber/gibber-bytestream-direct.c +++ b/lib/gibber/gibber-bytestream-direct.c @@ -494,8 +494,11 @@ gibber_bytestream_direct_accept_socket (GibberBytestreamIface *bytestream, } set_transport (self, transport); - gibber_transport_set_state (transport, GIBBER_TRANSPORT_CONNECTING); - gibber_transport_set_state (transport, GIBBER_TRANSPORT_CONNECTED); + if (gibber_transport_get_state (transport) == GIBBER_TRANSPORT_CONNECTED) + { + g_object_set (self, "state", GIBBER_BYTESTREAM_STATE_OPEN, + NULL); + } return TRUE; } |