Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed double closing of ports for one consoles.

  • Loading branch information...
commit a9abd1e470b0477558dca46b17551d4df8151ee0 1 parent 42c5b61
Heinz N. Gies authored April 07, 2013

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  apps/chunter/src/chunter_vm_fsm.erl
9  apps/chunter/src/chunter_vm_fsm.erl
@@ -171,7 +171,7 @@ init([UUID]) ->
171 171
 %% @end
172 172
 %%--------------------------------------------------------------------
173 173
 
174  
--spec initialized(Action::lad |
  174
+-spec initialized(Action::load |
175 175
                           {create,  PackageSpec::fifo:package(),
176 176
                            DatasetSpec::fifo:dataset(), VMSpec::fifo:config()}, State::term()) ->
177 177
                          {next_state, loading, State::term()} |
@@ -462,7 +462,12 @@ handle_info(Info, StateName, State) ->
462 462
 %% @end
463 463
 %%--------------------------------------------------------------------
464 464
 terminate(_Reason, _StateName, State  = #state{console = _C}) when is_port(_C) ->
465  
-    port_close(State#state.console),
  465
+    case erlang:port_info(State#state.console) of
  466
+        undefined ->
  467
+            ok;
  468
+        _ ->
  469
+            port_close(State#state.console)
  470
+    end,
466 471
     ok;
467 472
 
468 473
 terminate(_Reason, _StateName, _State) ->

0 notes on commit a9abd1e

Please sign in to comment.
Something went wrong with that request. Please try again.