mirror of
https://github.com/avwo/whistle.git
synced 2026-10-27 04:19:59 +08:00
add storage, bugfix: https://github.com/joyent/node/issues/9272
This commit is contained in:
+8
-6
@@ -98,12 +98,14 @@ function handleWebsocket(socket, clientIp, callback) {
|
||||
options = url.parse(fullUrl);
|
||||
resolveHost(fullUrl, function(ip) {
|
||||
var isWss = options.protocol == 'wss';
|
||||
reqSocket = (isWss ? tls : net).connect({
|
||||
rejectUnauthorized: false,
|
||||
host: ip,
|
||||
port: options.port || (isWss ? 443 : 80)
|
||||
}, pipeData);
|
||||
abortIfUnavailable(reqSocket);
|
||||
util.domain.run(function() {
|
||||
reqSocket = (isWss ? tls : net).connect({
|
||||
rejectUnauthorized: false,
|
||||
host: ip,
|
||||
port: options.port || (isWss ? 443 : 80)
|
||||
}, pipeData);
|
||||
abortIfUnavailable(reqSocket);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user