@@ -170,8 +170,10 @@ cdef class Message:
170170 info.pos = error_pos
171171 info.message = buf.read_str(CS_FORM_IMPLICIT).rstrip()
172172
173- # an error message always marks the end of a response!
174- self .end_of_response = True
173+ # an error message marks the end of a response if no explicit end of
174+ # response is available
175+ if not buf._caps.supports_end_of_request:
176+ self .end_of_response = True
175177
176178 cdef int _process_message(self , ReadBuffer buf,
177179 uint8_t message_type) except - 1 :
@@ -182,6 +184,8 @@ cdef class Message:
182184 elif message_type == TNS_MSG_TYPE_STATUS:
183185 buf.read_ub4(& self .call_status)
184186 buf.read_ub2(& self .end_to_end_seq_num)
187+ if not buf._caps.supports_end_of_request:
188+ self .end_of_response = True
185189 elif message_type == TNS_MSG_TYPE_PARAMETER:
186190 self ._process_return_parameters(buf)
187191 elif message_type == TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK:
@@ -1927,7 +1931,8 @@ cdef class DataTypesMessage(Message):
19271931 buf.read_uint16(& conv_data_type)
19281932 if conv_data_type != 0 :
19291933 buf.skip_raw_bytes(4 )
1930- self .end_of_response = True
1934+ if not buf._caps.supports_end_of_request:
1935+ self .end_of_response = True
19311936
19321937 cdef int _write_message(self , WriteBuffer buf) except - 1 :
19331938 cdef:
@@ -2363,7 +2368,8 @@ cdef class ProtocolMessage(Message):
23632368 uint8_t message_type) except - 1 :
23642369 if message_type == TNS_MSG_TYPE_PROTOCOL:
23652370 self ._process_protocol_info(buf)
2366- self .end_of_response = True
2371+ if not buf._caps.supports_end_of_request:
2372+ self .end_of_response = True
23672373 else :
23682374 Message._process_message(self , buf, message_type)
23692375
@@ -2416,14 +2422,12 @@ cdef class FastAuthMessage(Message):
24162422 if message_type == TNS_MSG_TYPE_PROTOCOL:
24172423 ProtocolMessage._process_message(self .protocol_message, buf,
24182424 message_type)
2419- self .end_of_response = False
24202425 elif message_type == TNS_MSG_TYPE_DATA_TYPES:
24212426 DataTypesMessage._process_message(self .data_types_message, buf,
24222427 message_type)
2423- self .end_of_response = False
24242428 else :
24252429 AuthMessage._process_message(self .auth_message, buf, message_type)
2426- self .end_of_response = True
2430+ self .end_of_response = self .auth_message.end_of_response
24272431
24282432 cdef int _write_message(self , WriteBuffer buf) except - 1 :
24292433 """
0 commit comments