WrathChaos/StompClientLib

End of stream error

jbarros35 opened this issue · 3 comments

My WebSocket won't last too much time, it connects and seconds right after it disconnects.
Its not reconnecting automatically, I don't know why...

let ack = destination
let id = destination
let header = ["destination": destination, "ack": ack, "id": id]
self.socketClient = StompClientLib()
socketClient.openSocketWithURLRequest(request: NSURLRequest(url: url as URL) , delegate: self)
socketClient.reconnect(request: NSURLRequest(url: url as URL), delegate: self)
socketClient.subscribeWithHeader(destination: destination, withHeader: header)

I tried the methods for reconnect with no avail yet

    // socketClient.reconnect(request: NSURLRequest(url: url as URL), delegate: self)
    // socketClient.reconnect(request: NSURLRequest(url: url as URL), delegate: self, connectionHeaders: header, time: 4, exponentialBackoff: false)
    socketClient.reconnect(request: NSURLRequest(url: url as URL) , delegate: self as StompClientLibDelegate, time: 4.0)

We are using Spring boot 1.5.9 on the server.

Hello @jbarros35,
Can you provide me with an example so I can test what is wrong? However, most probably it has a problem on your backend side.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.