Permalink
Browse files

pre rework of Outcome/Flow

  • Loading branch information...
1 parent f912129 commit 14a3359da39373abc9194aebf4a97c14c1d96d0a @cloudshift committed Mar 2, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −0 cloudshift/Session.hx
  2. +1 −1 cloudshift/Sys.hx
  3. +4 −0 cloudshift/flow/PushListenerImpl.hx
  4. +1 −1 haxelib.xml
View
@@ -22,6 +22,7 @@ enum ESessionOp {
interface SessionMgr implements Part<Dynamic,SessionMgr,ESessionOp> {
function exists(sessID:String,cb:Bool->Void):Void;
function stash(sessID:String,key:String,?val:Dynamic):Option<Dynamic>;
+ function logout(sessID:String,cb:ESession->Void):Void;
#if nodejs
function http():HttpServer;
#end
View
@@ -537,7 +537,7 @@ class Sys {
Node.fs.unwatchFile(fileName);
}
- public static function watch(fileName:String,?options:NodeWatchOpt,listener:String->String):Outcome<String,NodeFSWatcher>{
+ public static function watch(fileName:String,?options:NodeWatchOpt,listener:String->String->Void):Outcome<String,NodeFSWatcher>{
var prm = Core.outcome();
try {
var w = Node.fs.watch(fileName,options,listener);
@@ -44,6 +44,7 @@ class PushListenerImpl implements Conduit {
var goodCbs = cbs.filter(function(cb) return cb.fn != null);
if (goodCbs.length > 0) {
if (now - s.lastConnection > SESSION_EXPIRE) {
+ trace("expiring session");
removeSession(s);
notify(ConduitSessionExpire(sessID));
}
@@ -73,6 +74,9 @@ class PushListenerImpl implements Conduit {
_callbacks.remove(session.sessID);
_sessions.remove(session.sessID); // values() copies into array so this removal should be fine
session.shutDown();
+ _sessMgr.logout(session.sessID,function(el) {
+ trace("removed from session manager");
+ });
}
}
View
@@ -4,5 +4,5 @@
<tag v="javascript"/>
<tag v="js"/>
<description>A haXe Stack for Node.js</description>
- <version name="0.2.4">add upload, bitcoin module</version>
+ <version name="0.2.4-1">bugfix in form handling introduced last ver</version>
</project>

0 comments on commit 14a3359

Please sign in to comment.