avm2: Clear tempBuf when closing connection

This commit is contained in:
sleepycatcoding 2023-08-03 23:41:52 +03:00 committed by Nathan Adams
parent d8ae2ce6b9
commit 82c57a0d97
1 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,7 @@ package flash.net
private function socketCloseListener(evt:Event):void private function socketCloseListener(evt:Event):void
{ {
this.tempBuf.clear();
this.dispatchEvent(evt); this.dispatchEvent(evt);
} }
@ -93,7 +94,8 @@ package flash.net
public function close():void public function close():void
{ {
socket.close(); this.tempBuf.clear();
this.socket.close();
} }
public function connect(host:String, port:int):void public function connect(host:String, port:int):void