Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak in InMemoryConnectionStore #757

Closed
sbernard31 opened this issue Oct 17, 2019 · 1 comment
Closed

Memory Leak in InMemoryConnectionStore #757

sbernard31 opened this issue Oct 17, 2019 · 1 comment
Labels
bug Dysfunctionnal behavior client Impact LWM2M client server Impact LWM2M server

Comments

@sbernard31
Copy link
Contributor

sbernard31 commented Oct 17, 2019

See fore more details : eclipse-californium/californium#1099.

This affects Leshan-1.0.0-M11 and Leshan-1.0.0-M12.

A possible workaround is to use a fixed version of InMemoryConnectionStore by getting the corresponding version from californium (depending on which version of Leshan you are using) and applying this fix.

Then create a custom DTLSConnector with the fixed store like this :

builder.setEndpointFactory(new DefaultEndpointFactory() {
    @Override
    protected Connector createSecuredConnector(DtlsConnectorConfig dtlsConfig) {
        FixedInMemoryConnectionStore store = new FixedInMemoryConnectionStore(dtlsConfig.getMaxConnections(),
                dtlsConfig.getStaleConnectionThreshold(), null).setTag(dtlsConfig.getLoggingTag());
        return new DTLSConnector(dtlsConfig, store){};
    }
});

Maybe another possible workaround it to create a dummy SessionCache but I don't test it.

@sbernard31 sbernard31 added bug Dysfunctionnal behavior client Impact LWM2M client server Impact LWM2M server labels Oct 17, 2019
@sbernard31
Copy link
Contributor Author

Californium 2.0.0-RC1 is integrated in master. So this should be fixed now in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Dysfunctionnal behavior client Impact LWM2M client server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

1 participant