Skip to content

Commit

Permalink
Test SSL bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaxx committed Jan 18, 2013
1 parent 8c9b066 commit 870afea
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flash/3.4/src/com/hurlant/crypto/tls/TLSSocket.as
Expand Up @@ -125,7 +125,7 @@ package com.hurlant.crypto.tls {
public function close():void {
_ready = false;
_engine.close();
//_socket.flush();
_socket.flush();
_socket.close();
}

Expand Down
2 changes: 1 addition & 1 deletion flash/3.4/src/com/pubnub/Settings.as
Expand Up @@ -14,7 +14,7 @@ package com.pubnub {
// ie, 100 times, every 3 seconds for a network connection

// time in millseconds to wait for web server to return a response. DO NOT CHANGE unless requested by support
public static const OPERATION_TIMEOUT:uint = 310000;
public static const OPERATION_TIMEOUT:uint = 240000;

// for wait a response of a ping operation with [PING_OPERATION_URL], ms
public static const PING_OPERATION_TIMEOUT:uint = 30000;
Expand Down
4 changes: 4 additions & 0 deletions flash/3.4/src/com/pubnub/connection/AsyncConnection.as
Expand Up @@ -44,13 +44,15 @@ package com.pubnub.connection {
}

private function doSendOperation(operation:Operation):void {
trace('doSendOperation');
clearTimeout(timeout);
timeout = setTimeout(onTimeout, Settings.OPERATION_TIMEOUT, operation);
this.operation = operation;
loader.load(operation.request);
}

private function onTimeout(operation:Operation):void {
trace('onTimeout');
dispatchEvent(new OperationEvent(OperationEvent.TIMEOUT, operation));
}

Expand All @@ -60,11 +62,13 @@ package com.pubnub.connection {
}

override protected function onError(e:URLLoaderEvent):void {
trace('onError');
clearTimeout(timeout);
super.onError(e);
}

override protected function onClose(e:Event):void {
trace('onClose');
clearTimeout(timeout);
super.onClose(e);
}
Expand Down
1 change: 1 addition & 0 deletions flash/3.4/src/com/pubnub/net/URLLoader.as
Expand Up @@ -145,6 +145,7 @@ package com.pubnub.net {
try {
if (request) {
_response = new URLResponse(bytes, request);
//trace(_response.body);
Log.log('RESPONCE: ' + _response.body, Log.DEBUG);
}
//trace('onResponce : ' + _response.body);
Expand Down
8 changes: 4 additions & 4 deletions flash/3.4/src/com/pubnub/net/URLResponse.as
Expand Up @@ -55,8 +55,8 @@ package com.pubnub.net {
_code = matches[2];
_message = matches[3];
}else {
Log.log("Invalid header: " + firstLine + ", matches: " + matches, Log.ERROR);
trace("Invalid header: " + firstLine + ", matches: " + matches);
Log.log(this + "Invalid header: " + firstLine + ", matches: " + matches, Log.ERROR);
trace(this + "Invalid header: " + firstLine + ", matches: " + matches);
}
}

Expand Down Expand Up @@ -117,8 +117,8 @@ package com.pubnub.net {
var value:String = line.substring(ind + 1, line.length);
result.push( { name: name, value: value } );
} else {
trace("Invalid header: " + line);
Log.log("Invalid header: " + line, Log.ERROR);
trace("[URLResponse] Invalid header: " + line);
Log.log("[URLResponse] Invalid header: " + line, Log.ERROR);
}
}
return result;
Expand Down

0 comments on commit 870afea

Please sign in to comment.