Skip to content

Commit e98f002

Browse files
committed
Setting ScriptHostManager state before ScriptHost disposal
1 parent be779c7 commit e98f002

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/WebJobs.Script/Host/ScriptHostManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ public bool CanInvoke()
174174
_stopEvent
175175
});
176176

177+
// Immediately set the state to Default, which causes CanInvoke() to return false.
178+
State = ScriptHostState.Default;
179+
177180
// Orphan the current host instance. We're stopping it, so it won't listen for any new functions
178181
// it will finish any currently executing functions and then clean itself up.
179182
// Spin around and create a new host instance.

0 commit comments

Comments
 (0)