@@ -79,7 +79,7 @@ Below is a list of all ``box.session`` functions and members.
79
79
.. function :: id()
80
80
81
81
:return: the unique identifier (ID) for the current session.
82
- The result can be 0 meaning there is no session.
82
+ The result can be 0 or -1 meaning there is no session.
83
83
:rtype: number
84
84
85
85
.. _box_session-exists :
@@ -114,6 +114,7 @@ Below is a list of all ``box.session`` functions and members.
114
114
115
115
:return: the value of the :code: `sync ` integer constant used in the
116
116
`binary protocol <https://github.com/tarantool/tarantool/blob/1.10/src/box/iproto_constants.h >`_.
117
+ This value becomes invalid when the session is disconnected.
117
118
118
119
:rtype: number
119
120
@@ -330,6 +331,9 @@ Below is a list of all ``box.session`` functions and members.
330
331
trigger is invoked while the session associated with the client still exists
331
332
and can access session properties, such as :ref: `box.session.id() <box_session-id >`.
332
333
334
+ Since version 1.10, the trigger function is invoked immediately after the disconnect,
335
+ even if requests that were made during the session have not finished.
336
+
333
337
:param function trigger-function: function which will become the trigger function
334
338
:param function old-trigger-function: existing trigger function which will be replaced by trigger-function
335
339
:return: nil or function pointer
@@ -495,6 +499,8 @@ Below is a list of all ``box.session`` functions and members.
495
499
our terminology for net.box), and the client has options for getting
496
500
such messages.
497
501
502
+ This function returns an error if the session is disconnected.
503
+
498
504
:param string-or-number message: what to send
499
505
:param int sync: an optional argument to indicate what the session is,
500
506
as taken from an earlier call to :ref: `box_session:sync() <box_session-sync >`.
0 commit comments