WrathChaos/StompClientLib

enable Assert (self.readyState != SR_CONNECTING)

www16852 opened this issue · 3 comments

Hi,
im getting this Assert NSAssert(self.readyState != SR_CONNECTING, @"Invalid State: Cannot call send: until connection is open");
in - (void)send:(id)data;

check code ,I think the problem is that :
StompClient.swift 308
socket?.send(StompCommands.commandPing)

maybe I can alter:
if socket?.readyState == .OPEN {
socket?.send(StompCommands.commandPing)
}

Or have other solving??

Hello @www16852,
I could not reproduce this problem, can you share some code with me. Let's solve this problem together :)

Hi I’m getting "Invalid Sec-WebSocket-Accept response” error when connect to websocket server developed in java spring boot. Java client is able to successfully connect and send message,

Below is our code implementation

import StompClientLib

   var socketClient = StompClientLib()
    let completedWSURL = "ws://192.168.1.37:8080/iostest/chat"
     let Request = NSMutableURLRequest(url: NSURL(string:completedWSURL)! as URL)
    socketClient.openSocketWithURLRequest(request:Request, delegate: self as        StompClientLibDelegate)

Error response is
Error Domain=SRWebSocketErrorDomain Code=2133 "Invalid Sec-WebSocket-Accept response" UserInfo={NSLocalizedDescription=Invalid Sec-WebSocket-Accept response}

Any help is much appreciated. Thanks in advance.

Hey @lithinJames,
You already opened an issue about this, please continue on that issue :)