-
Notifications
You must be signed in to change notification settings - Fork 841
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
Create and Connect many sockets crashes/hangs #232
Comments
I would think that would be some kind of problem with NSURLSession or something along those lines. Have you tried testing this with forced WebSocket? |
with |
Is there a set number of connections that it opens before they subsequently start failing? |
Without forced WebSockets about 20-60. |
20-60 is a pretty large range. Have you tried testing some sort of rate limiter? Also is there some sort of error message that happens? |
ok 63 work, 64 doesn't |
What platform are you testing on? |
Mac OS |
When I test this outside of XCTest it seems to work. let NUM_SOCKETS = 90
var connects = 0
let sockets = [SocketIOClient](count: NUM_SOCKETS, repeatedValue: SocketIOClient(socketURL: "localhost:8080"))
for socket in sockets {
socket.on("connect") {data, ack in
connects++
}
socket.connect()
}
let waitTime = dispatch_time(DISPATCH_TIME_NOW, Int64(1 * NSEC_PER_SEC))
dispatch_after(waitTime, dispatch_get_main_queue()) {
assert(connects == NUM_SOCKETS, "Did not connect all sockets: \(connects)")
} |
Anymore on this? |
@lightsprint09 Anymore on this? |
Did not have the time to investigate any further |
I think it has to do with daltoniam/Starscream#153 in which there's nothing really we can do. |
Running the following test code hangs after connecting to a some Socket clients and all other clients time out. I think this isn't normal behavior.
The text was updated successfully, but these errors were encountered: