|
@@ -66,9 +66,11 @@ handle_call(Command, From, State) ->
|
|
|
Req = {{call, From}, Command},
|
|
|
command(Command, State#state{queue = queue:in(Req, Q)}).
|
|
|
|
|
|
-handle_cast({{From, Ref}, Command}, State) ->
|
|
|
+handle_cast({{Method, From, Ref}, Command} = Req, State)
|
|
|
+ when ((Method == cast) or (Method == incremental)),
|
|
|
+ is_pid(From),
|
|
|
+ is_reference(Ref) ->
|
|
|
#state{queue = Q} = State,
|
|
|
- Req = {{cast, From, Ref}, Command},
|
|
|
command(Command, State#state{queue = queue:in(Req, Q)});
|
|
|
|
|
|
handle_cast(stop, State) ->
|