File tree Expand file tree Collapse file tree 5 files changed +22
-2
lines changed Expand file tree Collapse file tree 5 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7- ## [ 1.10.1] - Unreleased
7+ ## [ 1.10.1] - 2023-12-21
88
99### Fixed
1010
11+ - Call iProvider.shutdown() on program exit.
1112- #33 - SIGABRT on interface detach.
1213
1314## [ 1.10.0] - 2023-10-03
Original file line number Diff line number Diff line change 22Changelog
33#########
44
5+ Version 1.10.1
6+ ==============
7+
8+ * Call iProvider.shutdown() on program exit.
9+ * Fix: #33 - SIGABRT on interface detach.
10+
511Version 1.10.0
612==============
713
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ cov-report = [
6565 " - coverage combine" ,
6666 " coverage report" ,
6767]
68+ cov-html = [
69+ " - coverage combine" ,
70+ " coverage html" ,
71+ ]
6872cov = [
6973 " test-cov" ,
7074 " cov-report" ,
Original file line number Diff line number Diff line change 6161 Server , Statement )
6262
6363#: Current driver version, SEMVER string.
64- __VERSION__ = '1.10.0 '
64+ __VERSION__ = '1.10.1 '
Original file line number Diff line number Diff line change 5050import struct
5151import datetime
5252import decimal
53+ import atexit
5354from abc import ABC , abstractmethod
5455from warnings import warn
5556from pathlib import Path
@@ -150,6 +151,14 @@ def __api_loaded(api: a.FirebirdAPI) -> None:
150151
151152add_hook (APIHook .LOADED , a .FirebirdAPI , __api_loaded )
152153
154+ @atexit .register
155+ def _api_shutdown ():
156+ """Calls a smart shutdown of various Firebird subsystems (yValve, engine, redirector).
157+ """
158+ if _master is not None :
159+ with _master .get_dispatcher () as provider :
160+ provider .shutdown (0 , - 3 ) # fb_shutrsn_app_stopped
161+
153162def _create_blob_buffer (size : int = MAX_BLOB_SEGMENT_SIZE ) -> Any :
154163 if size < MAX_BLOB_SEGMENT_SIZE :
155164 result = getattr (_thns , 'blob_buf' , None )
You can’t perform that action at this time.
0 commit comments