Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
c91d07c
)
[thrift] Erlang thrift_sup will exit if it can't bind to the given address
author
Christopher Piro
<cpiro@apache.org>
Wed, 20 Feb 2008 08:19:38 +0000
(08:19 +0000)
committer
Christopher Piro
<cpiro@apache.org>
Wed, 20 Feb 2008 08:19:38 +0000
(08:19 +0000)
Summary: before it would complain and not exit. that's not right.
Reviewed By: eletuchy
Test Plan: DEATH ENSUES
Revert Plan: sounds reasonable
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665490
13f79535
-47bb-0310-9956-
ffa450edef68
lib/erl/src/thrift_sup.erl
patch
|
blob
|
history
diff --git
a/lib/erl/src/thrift_sup.erl
b/lib/erl/src/thrift_sup.erl
index
ab3f80e
..
8be57df
100644
(file)
--- a/
lib/erl/src/thrift_sup.erl
+++ b/
lib/erl/src/thrift_sup.erl
@@
-36,5
+36,10
@@
init([Port, Handler, Processor]) ->
thrift_start_link(SF = tErlServer, Port, Hnd, Pr, ST, TF, PF) ->
Args = [Port, Hnd, Pr, ST, TF:new(), PF:new()],
Pid = oop:start_new(SF, Args),
- ?R0(Pid, effectful_serve),
+ case ?R0(Pid, effectful_serve) of
+ ok ->
+ ok;
+ {error, eaddrinuse} ->
+ exit(eaddrinuse)
+ end,
{ok, Pid}.