hramenko / bauglir-websocket

Automatically exported from code.google.com/p/bauglir-websocket
0 stars 0 forks source link

SendData is not ThreadSafe #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write a client which uses the websocket client object
2. Multithread alot of sendTexts 
3. Watch it start to send garbage to server

What is the expected output? What do you see instead?
Server starts to complain the data coming through is not UTF-8

What version of the product are you using? On what operating system?
Latest, on windows

Please provide any additional information below.

Its simple to fix, just wrap the core of sendData in a lock(object) { } which 
will allow only 1 frame sent at a time.

Original issue reported on code.google.com by dar...@baselineit.org on 25 Feb 2013 at 7:52