Skip to content

teardown on never connected RelpConnection throws npe #63

@kortemik

Description

@kortemik

Describe the bug

Cannot invoke "java.nio.channels.SocketChannel.close()" because "this.socketChannel" is null> java.lang.NullPointerException: Cannot invoke "java.nio.channels.SocketChannel.close()" because "this.socketChannel" is null
        at com.teragrep.rlp_01.RelpClientPlainSocket.close(RelpClientPlainSocket.java:150)
        at com.teragrep.rlp_01.RelpConnection.tearDown(RelpConnection.java:169)

when connection has never been connected

Expected behavior
shouldn't throw, should just be no-op because there is nothing to teardown

How to reproduce
create new RelpConnection and immediately call teardown() on it.

Screenshots

Software version
4.0.1

Desktop (please complete the following information if relevant):

  • OS:
  • Browser:
  • Version:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions