Coder Social home page Coder Social logo

stompj's People

Contributors

aamir-pk avatar

Watchers

 avatar

stompj's Issues

Network disconnects are not handled gracefully

What steps will reproduce the problem?
1. Connect to a broker
2. Subscribe and begin receiving messages
3. Cause the network connection to be lost

What is the expected output? What do you see instead?
The library should either handle the exception and try to reconnect until 
successful or pass the exception up to the main application.  Instead the 
application crashes because it fails to handle the exception.

What version of the product are you using? On what operating system?
0.5 on Android 2.3

Please provide any additional information below.

Exception:
FATAL EXCEPTION: Thread-11
pk.aamir.stompj.StompJRuntimeException: BufferedInputStream is closed
at pk.aamir.stompj.internal.FrameReceiver.getLine(FrameReceiver.java:82 at 
pk.aamir.stompj.internal.FrameReceiver.processInComingFrame(FrameReceiver.java:5
5) at pk.aamir.stompj.internal.FrameReceiver.run(FrameReceiver.java:50)
Caused by: java.io.IOException: BufferedInputStream is closed at 
java.io.BufferedInputStream.streamClosed(BufferedInputStream.java:116)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:221)
    at pk.aamir.stompj.internal.FrameReceiver.getLine(FrameReceiver.java:71)
   ... 2 more


Original issue reported on code.google.com by [email protected] on 12 Oct 2011 at 2:39

NullPointerException in connecting

con = new Connection("url", 61613, "guest", "guest");
        try {
            System.out.println("Starting connection");
            ErrorMessage errmsg = con.connect();
            if (errmsg != null)
                System.out.println("Error? "+errmsg.getContentAsString());
        } catch (StompJException e) {
            // TODO Auto-generated catch block
            System.out.println("Couldn't connect with Java Stomp thing");
            e.printStackTrace();
        }




/////////////

Here are results :-(

Initializing connection
[INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer 
service created
Starting connection
[ERROR] [Launcher:/app] org.red5.server.Scope - Could not start scope 
[WebScope@55f35e30 Depth = 1, Path = '/default', Name = 'app']. 
java.lang.NullPointerException

Original issue reported on code.google.com by [email protected] on 4 Mar 2011 at 7:13

StompJRuntimeException when disconnecting from stompj

What steps will reproduce the problem?
call con.disconnect() function.

What is the expected output? What do you see instead?
expected output: no runtime exception.
when the con.disconnect is called, a runtime exception appears. Here is the 
trace:

Exception in thread "Thread-1" pk.aamir.stompj.StompJRuntimeException: socket 
closed
    at pk.aamir.stompj.internal.FrameReceiver.getLine(FrameReceiver.java:82)
    at pk.aamir.stompj.internal.FrameReceiver.processInComingFrame(FrameReceiver.java:55)
    at pk.aamir.stompj.internal.FrameReceiver.run(FrameReceiver.java:50)
Caused by: java.net.SocketException: socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at pk.aamir.stompj.internal.FrameReceiver.getLine(FrameReceiver.java:71)    at pk.aamir.stompj.internal.FrameReceiver.getLine(FrameReceiver.java:71)





Original issue reported on code.google.com by [email protected] on 28 May 2011 at 1:31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.