Skip to content

Commit

Permalink
Merge branch 'hotfix/fix-deadlock-on-receive'
Browse files Browse the repository at this point in the history
  • Loading branch information
lleoncr committed Dec 9, 2021
2 parents fa523d5 + 192d580 commit ab4d5b7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl required version of autoconf
AC_PREREQ([2.53])

dnl Gstreamer's daemon package name and version
AC_INIT([gstd],[0.13.0])
AC_INIT([gstd],[0.13.1])

dnl required version of gstreamer and gst-plugins-base
GST_REQUIRED=1.0.0
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
gstd (0.13.1-1) unstable; urgency=medium

* Fix deadlock when a socket dies or closes incorrectly on PyGstc

-- RidgeRun Engineering <[email protected]> Wed, 08 Dec 08:30:00 -0600

gstd (0.13.0-1) unstable; urgency=medium

* Add libgstc support to get pipeline state
Expand Down
5 changes: 5 additions & 0 deletions libgstc/python/pygstc/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ def _recvall(self, sock, timeout):
except socket.error as e:
raise TimeoutError from e

# When a connection dies, the socket does not close properly and it
# returns immediately with an empty string. So, check that first.
if len(newbuf) == 0:
break

if self._terminator in newbuf:
buf += newbuf[:newbuf.find(self._terminator)]
break
Expand Down
2 changes: 1 addition & 1 deletion libgstc/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

setup(
name='pygstc',
version='0.2.0',
version='0.2.1',
description='Python GStreamer Daemon Client',
long_description='Python GStreamer Daemon Client',
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('gstd', 'c',
version : '0.13.0',
version : '0.13.1',
meson_version : '>= 0.50',)

gstd_version = meson.project_version()
Expand Down

0 comments on commit ab4d5b7

Please sign in to comment.