diff --git a/web/pgadmin/tools/datagrid/__init__.py b/web/pgadmin/tools/datagrid/__init__.py index 709e164..4dfb7e7 100644 --- a/web/pgadmin/tools/datagrid/__init__.py +++ b/web/pgadmin/tools/datagrid/__init__.py @@ -402,6 +402,7 @@ def close(trans_id): # Release the connection if conn.connected(): + # conn.cancel_transaction(cmd_obj.conn_id, cmd_obj.did) manager.release(did=cmd_obj.did, conn_id=cmd_obj.conn_id) # Remove the information of unique transaction id from the diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py index 9e5ff91..c9f1a4e 100644 --- a/web/pgadmin/tools/debugger/__init__.py +++ b/web/pgadmin/tools/debugger/__init__.py @@ -1301,20 +1301,22 @@ def messages(trans_id): # From the above message we need to find out port number # as "7" so below logic will find 7 as port number # and attach listened to that port number - offset = notify[0].find('PLDBGBREAK') - str_len = len('PLDBGBREAK') - str_len += 1 - tmpOffset = 0 - tmpFlag = False + port_found = False + for val in notify: + offset = val.find('PLDBGBREAK') + if offset < 0: + continue - while notify[0][offset + str_len + tmpOffset].isdigit(): - status = 'Success' - tmpFlag = True - port_number = port_number + \ - notify[0][offset + str_len + tmpOffset] - tmpOffset += 1 + offset = offset + len('PLDBGBREAK') + 1 + tmpOffset = 0 + + while val[offset + tmpOffset].isdigit(): + status = 'Success' + port_found = True + port_number = port_number + val[offset + tmpOffset] + tmpOffset += 1 - if not tmpFlag: + if not port_found: status = 'Busy' else: status = 'Busy'