Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable Assert (self.readyState != SR_CONNECTING) #24

Closed
www16852 opened this issue Apr 25, 2018 · 3 comments
Closed

enable Assert (self.readyState != SR_CONNECTING) #24

www16852 opened this issue Apr 25, 2018 · 3 comments

Comments

@www16852
Copy link

www16852 commented Apr 25, 2018

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??

@WrathChaos WrathChaos self-assigned this Apr 25, 2018
@WrathChaos
Copy link
Owner

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

@lithinJames
Copy link

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.

@WrathChaos
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants