Comments (3)
Also: I haven't ruled out the possibility that I'm doing something wrong, but I'm pretty sure I've got everything set correctly. Took me about 4 hours to realize it was the server sending dual messages rather than a bug in my javascript on the client side. (I originally started with a fairly complex script and finally got so frustrated, I backed it off to a simple, "Let's just alert the damn message from the server and see if it's even coming through correctly.")
from blwebsocketsserver.
I cannot reproduce the issue with my demo code.
Could you replace the - (NSData *)messageForUserWithId:(int)userId
method in BLAsyncMessageQueue
with the following code and give me the output of the two NSLogs ?
- (NSData *)messageForUserWithId:(int)userId {
NSData *message;
@synchronized(self) {
NSLog(@"BEFORE DEQUEUE %d %@", userId, self.usersMessageQueues[[NSNumber numberWithInt:userId]]);
message = [self.usersMessageQueues[[NSNumber numberWithInt:userId]] dequeue];
self.messagesCount--;
NSLog(@"AFTER DEQUEUE %d %@", userId, self.usersMessageQueues[[NSNumber numberWithInt:userId]]);
}
return message;
}
from blwebsocketsserver.
For the record, this was related to ARC.
Enabling the correct ARC flag for the file solved the problem.
from blwebsocketsserver.
Related Issues (11)
- Testing on iOS 5.x HOT 4
- Web service closed
- Have you modified the official source code of libwebsockets ?
- Server to open the success, but the message is not received, it is like hanging up HOT 2
- compile error
- Last socket connected does not work HOT 3
- 10.9 Compatibility HOT 3
- Advice on using with Swift with a framework target HOT 7
- Value conversion issues HOT 5
- Safari closes connection on large messages with x-webkit-deflate-frame HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blwebsocketsserver.