File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,11 @@ def terminate!
205
205
guard!
206
206
@terminated . set
207
207
parent_core . remove_child reference if parent_core
208
+ @mailbox . each do |envelope |
209
+ reject_envelope envelope
210
+ logger . debug "rejected #{ envelope . message } from #{ envelope . sender_path } "
211
+ end
212
+ @mailbox . clear
208
213
# TODO terminate all children
209
214
end
210
215
@@ -224,12 +229,6 @@ def process?
224
229
def receive_envelope
225
230
envelope = @mailbox . shift
226
231
227
- if terminated?
228
- # FIXME make sure that it cannot be GCed before all messages are rejected after termination
229
- reject_envelope envelope
230
- logger . debug "rejected #{ envelope . message } from #{ envelope . sender_path } "
231
- return
232
- end
233
232
logger . debug "received #{ envelope . message } from #{ envelope . sender_path } "
234
233
235
234
result = @actress . on_envelope envelope
You can’t perform that action at this time.
0 commit comments