--- deliantra/server/ext/login.ext 2007/01/07 21:54:59 1.12 +++ deliantra/server/ext/login.ext 2007/01/08 01:19:03 1.14 @@ -160,6 +160,7 @@ my $pl = cf::player::find $user or next; $pl->connect ($ns); check_clean_save $pl; + $pl->{clean_save} = 1; last; } elsif (can_cleanup $buf, $mtime) { Coro::Timer::sleep 1; @@ -309,10 +310,7 @@ $pl->deactivate; $pl->ns->destroy; } else { - cf::async { - $pl->{clean_save} = 1; - $pl->save; - }; + cf::async { $pl->save }; } }); }, @@ -367,6 +365,14 @@ $pl->save; Coro::Timer::sleep $SAVE_INTERVAL; } + my $ob = $pl->ob; + Scalar::Util::weaken $pl; # 2 == from object + from perl + Scalar::Util::weaken $ob; # 2 == one from being an object + ??? + my $a_ = $pl->refcnt; + my $b_ = $ob->refcnt; + my $a = $pl->refcnt_cnt; + my $b = $ob->refcnt_cnt; + warn "rc $a,$a_ $b,$b_\n";#d# }; warn $@ if $@; Coro::cede; @@ -374,5 +380,7 @@ } }; +cf::player::find "schmorp";#d# + $SCHEDULER->prio (1);