| CODENOTIFIER | HelpYou are not signed inSign in |
Project: ejabberd-modules
Revision: 710
Author: cromain
Date: 03 Sep 2008 08:06:52
Changes:don't hardcode connection timeout, use configured timeout instead
Files:| ... | ...@@ -129,6 +129,7 @@ | |
| 129 | 129 | |
| 130 | 130 | %% part of start/6 or start_link/6: |
| 131 | 131 | post_start(Pid, _LogFun) -> |
| 132 | Timeout = get_option(timeout, Options, ?DEFAULT_STANDALONE_TIMEOUT), | |
| 132 | 133 | receive |
| 133 | 134 | {mysql_conn, Pid, ok} -> |
| 134 | 135 | {ok, Pid}; |
| ... | ...@@ -138,7 +139,7 @@ | |
| 138 | 139 | % mysql:log(_LogFun, error, "mysql_conn: Received unknown signal, exiting"), |
| 139 | 140 | % mysql:log(_LogFun, debug, "mysql_conn: Unknown signal : ~p", [Unknown]), |
| 140 | 141 | % {error, "unknown signal received"} |
| 141 | after 5000 -> | |
| 142 | after Timeout -> | |
| 142 | 143 | {error, "timed out"} |
| 143 | 144 | end. |
| 144 | 145 |