in reply to Re^2: POE method problem (building applications with POE)
in thread POE method problem (building applications with POE)
When you create a connection, you store it as:
But $wheel_id is the same from one connection to another, so when the next connection comes along, you overwrite the last reference to the previous Wheel:RW, and it gets destroyed.$_[HEAP]->{clients}->{$wheel_id} = $temp_rw_id;
Try keeping a hash of active wheels, something like
instead. When you're done with a wheel, just "delete" it from that hash.$_[HEAP]->{clients}->{$wheel_id}->{$temp_rw_id}=undef;
This way, you're keeping a live reference to all active wheels.
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: POE method problem (building applications with POE)
by Orchid_NL (Novice) on Jan 08, 2005 at 12:24 UTC |