Listen for security errors on our socket.

Have the FrameReader stop listening on the socket when we're done with it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5707 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-04-03 17:40:54 +00:00
parent cc1690654a
commit c192056f3a
2 changed files with 14 additions and 2 deletions
+9 -1
View File
@@ -44,6 +44,14 @@ public class FrameReader extends EventDispatcher
_socket.addEventListener(ProgressEvent.SOCKET_DATA, socketHasData);
}
/**
* Stop listening on the socket.
*/
public function shutdown () :void
{
_socket.removeEventListener(ProgressEvent.SOCKET_DATA, socketHasData);
}
/**
* Called when our socket has data that we can read.
*/
@@ -52,7 +60,7 @@ public class FrameReader extends EventDispatcher
try {
readAvailable();
} catch (e :Error) {
Log.getLog(this).warning("Error reading socket data [e=" + e + "].");
Log.getLog(this).warning("Error reading socket data", e);
}
}