# Behavior in receiveSignal

**URL:** <https://discuss.akka.io/t/behavior-in-receivesignal/2977>\
**Category:** Akka Libraries\
**Created:** [December 14, 2018, 6:25pm UTC](https://discuss.akka.io/t/behavior-in-receivesignal/2977 "2018-12-14T18:25:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zlaja](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/zlaja/32/2143_2.png) [@zlaja](https://discuss.akka.io/u/zlaja)\
**Post date:** [December 14, 2018, 6:25pm UTC](https://discuss.akka.io/t/behavior-in-receivesignal/2977/1 "2018-12-14T18:25:39Z")

</div>

Hi,

I’am experimenting with akka-actor-typed 2.5.19. I have an actor (behavior) which is supervised with a restart strategy.  
The actor throws an Exception which cause PreRestart signal.

A part for handling the signal:

```
	receiveSignal {
   
    	case (context, PreRestart) =>          
    		behavior
	}

```

RestartSupervisor will start initial behavior after restart:  
Behavior.validateAsInitial(Behavior.start(initial, ctx))

What is happening with the behevior returned in receiveSignal?   
Is it used anywhere ?

Zlaja

---

<div class="post-metadata">

**Author:** ![patriknw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/patriknw/32/89_2.png) [@patriknw](https://discuss.akka.io/u/patriknw)\
**Post date:** [December 14, 2018, 8:35pm UTC](https://discuss.akka.io/t/behavior-in-receivesignal/2977/2 "2018-12-14T20:35:07Z")

</div>

For PreStart (and PostStop) signal the returned behavior isn’t used.
