Permalink
Browse files

mErge branch 'test' into dev

  • Loading branch information...
2 parents 61b966e + a9abd1e commit b8496b6da4d26fbe85ba89edbe2c0a2041af193f @Licenser Licenser committed Apr 7, 2013
Showing with 7 additions and 2 deletions.
  1. +7 −2 apps/chunter/src/chunter_vm_fsm.erl
View
9 apps/chunter/src/chunter_vm_fsm.erl
@@ -171,7 +171,7 @@ init([UUID]) ->
%% @end
%%--------------------------------------------------------------------
--spec initialized(Action::lad |
+-spec initialized(Action::load |
{create, PackageSpec::fifo:package(),
DatasetSpec::fifo:dataset(), VMSpec::fifo:config()}, State::term()) ->
{next_state, loading, State::term()} |
@@ -462,7 +462,12 @@ handle_info(Info, StateName, State) ->
%% @end
%%--------------------------------------------------------------------
terminate(_Reason, _StateName, State = #state{console = _C}) when is_port(_C) ->
- port_close(State#state.console),
+ case erlang:port_info(State#state.console) of
+ undefined ->
+ ok;
+ _ ->
+ port_close(State#state.console)
+ end,
ok;
terminate(_Reason, _StateName, _State) ->

0 comments on commit b8496b6

Please sign in to comment.