fusesource / mqtt-client

A Java MQTT Client
http://mqtt-client.fusesource.org/
Apache License 2.0
1.27k stars 369 forks source link

Peer Disconnection... #50

Open DougAnsonAustinTX opened 8 years ago

DougAnsonAustinTX commented 8 years ago

Hi:

I am trying to use the mqtt-client library (v1.11) with IBM IoT Foundations and, for the most part, everything works fine.

However, after some amount of use (varies...) I start getting the following un-trappable exception: 4: java.io.EOFException: Peer disconnected at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.read(AbstractProtocolCodec.java:331) at org.fusesource.hawtdispatch.transport.TcpTransport.drainInbound(TcpTransport.java:706) at org.fusesource.hawtdispatch.transport.TcpTransport$6.run(TcpTransport.java:588) at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209) at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100) at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)

I am not sure what this exception implies because of the following:

At minimum, it would be good to capture this exception during a publish() invocation so that I could close() and open a new MQTT connection.

Has anyone else seen this? Any ideas what it might be?

Thanks in advance...

Doug

yeminkhaung commented 7 years ago

@ansondtx20 Hello, did you solved the problem?

I am also having the same problem of "peer disconnected" after publish() is succeeded.

DougAnsonAustinTX commented 7 years ago

None yet... trapping the issue for now... may end up switching over to the Paho library.

kthacker7 commented 6 years ago

Anyone looked into this yet? Running into this issue even now

cleverpig commented 5 years ago

mark+1

vae13 commented 4 years ago

卧槽!我也是这个问题,这是为啥