Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions rticonnextdds-connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ class _ConnectorBinding {
RTI_Connector_get_last_error_message: ['char *', []],
RTI_Connector_get_native_instance: ['int', ['pointer', 'string', ref.refType('pointer')]],
RTI_Connector_free_string: ['void', ['char *']],
RTI_Connector_set_max_objects_per_thread: ['int', ['int']],
RTIDDSConnector_getJSONInstance:['char *', ['pointer', 'string']],
// This API is only used in the unit tests
RTI_Connector_create_test_scenario: ['int', ['pointer', 'int', 'pointer']]
Expand Down Expand Up @@ -2044,29 +2043,6 @@ class Connector extends EventEmitter {
}
}
}

/**
* Allows you to increase the number of :class:`Connector` instances that
* can be created.
*
* The default value is 2048 (which allows for approximately 15 instances
* of :class:`Connector` to be created in a single application). If you need
* to create more than 8 instances of :class:`Connector`, you can increase
* the value from the default.
*
* .. note::
* This is a static method. It can only be called before creating a
* :class:`Connector` instance.
*
* See `SYSTEM_RESOURCE_LIMITS QoS Policy
* <https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_professional/users_manual/index.htm#users_manual/SYSTEM_RESOURCE_LIMITS_QoS.htm>`__
* in the *RTI Connext DDS Core Libraries User's Manual* for more information.
*
* @param {number} value The value for ``max_objects_per_thread``
*/
static setMaxObjectsPerThread (value) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of deleting the function and potentially breaking user applications, is there a way to mark it as deprecated and leave an empty implementation?

_checkRetcode(connectorBinding.api.RTI_Connector_set_max_objects_per_thread(value))
}
}

// Export the API
Expand Down
12 changes: 12 additions & 0 deletions test/nodejs/test_rticonnextdds_connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ describe('Connector Tests', function () {
expect(connector).to.be.instanceOf(rti.Connector)
})

// Test for CON-200
it('Connector should not segfault if deleted twice', async function () {
Comment thread
samuelraeburn marked this conversation as resolved.
const xmlProfile1 = path.join(__dirname, '/../xml/TestConnector.xml')
const xmlProfile2 = path.join(__dirname, '/../xml/TestConnector2.xml')
const fullXmlPath = xmlProfile1 + ';' + xmlProfile2
const connector = new rti.Connector('MyParticipantLibrary2::MyParticipant2', fullXmlPath)
expect(connector).to.exist
expect(connector).to.be.instanceOf(rti.Connector)
await connector.close()
await connector.close()
})

describe('Connector callback test', function () {
let connector

Expand Down