tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 246 forks source link

WebSocketCompression - race condition causes compression setting inconsistencies #81

Open marknorgren opened 7 years ago

marknorgren commented 7 years ago

When attempting to turn on compression it appears there is a race condition that may open WebSocket connection before setting compression to .on

let ws = WebSocket("ws://url")
ws.compression.on = true