mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
bugfix for https server
This commit is contained in:
@@ -275,22 +275,26 @@ function connectReqHandler(req, socket, head){
|
||||
internalHttpsPort,
|
||||
httpsServerMgrInstance;
|
||||
|
||||
|
||||
async.series([
|
||||
|
||||
//check if internal https server exists
|
||||
function(callback){
|
||||
if(internalHttpsPort){
|
||||
if(!shouldIntercept){
|
||||
callback();
|
||||
return;
|
||||
}else{
|
||||
getPort(function(port){
|
||||
internalHttpsPort = port;
|
||||
httpsServerMgrInstance = new httpsServerMgr({
|
||||
port :port,
|
||||
handler :userRequestHandler
|
||||
});
|
||||
if(internalHttpsPort){
|
||||
callback();
|
||||
});
|
||||
}else{
|
||||
getPort(function(port){
|
||||
internalHttpsPort = port;
|
||||
httpsServerMgrInstance = new httpsServerMgr({
|
||||
port :port,
|
||||
handler :userRequestHandler
|
||||
});
|
||||
callback();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user