Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

SmppSession#isBound returns true even when the channel closed #93

Open

Description

@krasa

easily reproducible on both master and netty4, connect and then shutdown the server

public static void main(String[] args) throws UnrecoverablePduException, SmppChannelException, InterruptedException, SmppTimeoutException {
        DefaultSmppClient clientBootstrap = new DefaultSmppClient(Executors.newCachedThreadPool());
        SmppSessionConfiguration config = new SmppSessionConfiguration();
        config.setWindowSize(1);
        config.setHost("127.0.0.1");
        config.setPort(5000);
        try {
            SmppSession session = clientBootstrap.bind(config,new DefaultSmppSessionHandler());
            while (session.isBound()) { //always true
                System.out.println("bound");
                Thread.sleep(1000);
            }
        } finally {
            System.out.println("destroying");
            clientBootstrap.destroy();
        }
    }

Seems to me that DefaultSmppSession#fireChannelClosed should update the state

Activity

  1. jjlauer commented on Apr 18, 2015

    @jjlauer
    Contributor

    Looks like a good find. Do you think you could produce a unit test & fix in a PR?

  2. krasa commented on Apr 18, 2015

    @krasa
    ContributorAuthor

    yeah, sure.

  3. added 3 commits that reference this issue on Apr 18, 2015
  4. added a commit that references this issue on May 13, 2015
    de72755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions