- delete $work{$f[2]};
- $ref->{stream} = $f[3];
- $ref->{count} = 0;
- $ref->{linesreq} = 5;
- $work{"$f[2]$f[3]"} = $ref; # new ref
- dbg('msg', "incoming subject ack stream $f[3]\n");
- $busy{$f[2]} = $ref; # interlock
- $ref->{lines} = [];
- push @{$ref->{lines}}, ($ref->read_msg_body);
- $ref->send_tranche($self);
+ if ($ref) {
+ delete $work{$f[2]};
+ $ref->{stream} = $f[3];
+ $ref->{count} = 0;
+ $ref->{linesreq} = 5;
+ $work{"$f[2]$f[3]"} = $ref; # new ref
+ dbg('msg', "incoming subject ack stream $f[3]\n");
+ $busy{$f[2]} = $ref; # interlock
+ $ref->{lines} = [];
+ push @{$ref->{lines}}, ($ref->read_msg_body);
+ $ref->send_tranche($self);
+ } else {
+ $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream
+ }