Meet Peer disconnected error when create two connection to different servers.
lemonbar opened this issue · 0 comments
lemonbar commented
Hello, fusesource
I used mqtt-client to instantiate two MQTT, connect to different servers at the same time, and meet peer disconnected error.
I debug the code, and found this error was thrown in
AbstractProtocolCodec.read
readCounter += lastReadIoSize; if (lastReadIoSize == -1) { readCounter += 1; // to compensate for that -1 throw new EOFException("Peer disconnected"); } else if (lastReadIoSize == 0) { if ( readStart == readBuffer.position() ) { if (candidateForCheckin) { readBufferPool.checkin(readBuffer.array()); } readStart = 0; readEnd = 0; readBuffer = null; } return null; }
Thanks very much in advance if you can give me some suggestion.