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

EnquireLink doesnt work only bind is and no message is submitted and after 5 min connection is lost #40

Open
GoogleCodeExporter opened this issue Oct 9, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run SimpleSubmitExample.java
2. Comment out shortmessagesubmit line
3. Remove unbind line also from the code
4. Dont submit any message for more than 5 min 

What is the expected output? What do you see instead?
We should have connection status as bind and enquirelink should work after
5 sec 

What version of the product are you using? On what operating system?
Tested jsmpp-2.0 and jsmpp-2.0.1  OS opens Suse 
Bind connection was possible  but after 5 min connection was lost .


Please provide any additional information below.
Patch 
First part of the patch is been fixed in recent version of setting
setSoTimeout before PDUReaderWorker().start() is made


  */
    public String connectAndBind(String host, int port,
            BindParameter bindParam, long timeout)
            throws IOException {
        logger.debug("Connect and bind to {} port {}", host, port);
        if (sequence().currentValue() != 1) {
            throw new IOException("Failed connecting");
        }

        conn = connFactory.createConnection(host, port);
        logger.info("Connected");
        conn.setSoTimeout(getEnquireLinkTimer());
        sessionContext.open();
        try {

Second patch is to check for the equireLink is null or not 

private void notifyNoActivity() {
            logger.debug("No activity notified");
            if (enquireLinkSender != null) {
                enquireLinkSender.enquireLink();
            }
        }




Original issue reported on code.google.com by ashwinmo...@gmail.com on 30 Jun 2009 at 11:19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant