Skip to content

Commit

Permalink
Try to fix hang when init fails, #61
Browse files Browse the repository at this point in the history
  • Loading branch information
ahendrix committed Feb 18, 2022
1 parent b5da251 commit 227c69b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ static PyObject * init(PyObject * self, PyObject * args) {
Py_INCREF(Py_None);
result = Py_None;
} else {
Py_BEGIN_ALLOW_THREADS
CECDestroy(CEC_adapter);
CEC_adapter = NULL;
Py_END_ALLOW_THREADS

char errstr[1024];
snprintf(errstr, 1024, "CEC failed to open %s", dev);
Expand Down

0 comments on commit 227c69b

Please sign in to comment.