[BUG] WebSocket

With Cocos Creator 1.1.2, trying using WebSocket, I get the following error with an iOS build using the device, instead it works fine using the Xcode simulator and/or the web browser.

[WebSocket::init] _host: localhost, _port: 8080, _path: /
WebSocket::onSubThreadStarted, instance: 0x15dea3820
NOTICE: Initial logging level 967
NOTICE: Libwebsockets version: 1.7.8 linwenhai@LindeMacBook-Pro.local-v3.4-49-g9369eea
NOTICE: IPV6 compiled in and enabled
NOTICE: libev support not compiled in
NOTICE: Threads: 1 each 256 fds
NOTICE: mem: platform fd map: 2048 bytes
NOTICE: mem: per-conn: 368 bytes + protocol rx buf
WebSocket (0x15dea3820) onConnectionError …
Ready state is closing or was closed, code=2, quit websocket thread!
NOTICE: lws_context_destroy
WebSocket (0x15dea3820) onConnectionClosed …
WebSocket::onSubThreadEnded, instance: 0x15dea3820
In the destructor of WebSocket (0x15dea3820)

My source code is extremely simple:

ws = new WebSocket("ws://localhost:8080");
ws.onopen = function (event) {
    console.log("Send Text WS was opened.");
};

It may be related to App Transport Security in iOS 9

@pandamicro, I don’t think so because I added it into my .plist file, and actually with the iOS simulator works fine, the issue is with the device (iPhone 6+ iOS 9.3.3 in my case).

Any update on this issue, I have this problem on both simuator and physical device, in my case is iPhone 6+