Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
3e4fee24 by Philipp Hörist at 2023-01-17T14:05:44+01:00
fix: Handle race condition when cancelling request
Fixes #136
- - - - -
1 changed file:
- nbxmpp/http.py
Changes:
=====================================
nbxmpp/http.py
=====================================
@@ -449,6 +449,17 @@ class HTTPRequest(GObject.GObject):
self._set_failed(HTTPRequestError.STATUS_NOT_OK)
return
+ self._log.info('Request status: %s', Soup.Status.get_phrase(status))
+
+ if self._cancellable.is_cancelled():
+ # It can happen that the message is finished before the
+ # response callback returns after calling cancel(). If
+ # we call complete, the response callback will also
+ # try to cleanup and will fail.
+ self._log.info('Skip setting message complete because '
+ 'cancel is in progess')
+ return
+
self._set_complete()
def _set_failed(self, error: HTTPRequestError) -> None:
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3e4fee240f88cf7fed7648ea…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3e4fee240f88cf7fed7648ea…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
b28169c8 by Philipp Hörist at 2023-01-16T17:52:49+01:00
fix: Disable legacy ciphers in cryptography
Otherwise more dependencies need to be installed which we don’t need
- - - - -
1 changed file:
- gajim/gajim.py
Changes:
=====================================
gajim/gajim.py
=====================================
@@ -101,7 +101,10 @@ def _init_gui(gui: str) -> None:
_init_gtk()
-def _disable_csd() -> None:
+def _set_env_vars() -> None:
+ # Disable legacy ciphers in cryptography
+ os.environ['CRYPTOGRAPHY_OPENSSL_NO_LEGACY'] = '1'
+
if sys.platform != 'win32':
return
@@ -159,6 +162,6 @@ def main() -> None:
_check_required_deps()
_set_proc_title()
- _disable_csd()
+ _set_env_vars()
_init_gui('GTK')
_run_app()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/b28169c8d8e546e034bb28fcee67c069…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/b28169c8d8e546e034bb28fcee67c069…
You're receiving this email because of your account on dev.gajim.org.