mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-10-01 13:10:20 +02:00
let piler child process give 421 error if it cannot connect to database
This commit is contained in:
1 parent
37ffe22419
commit
b690a4bb5c
1 file changed
+5
@@ -79,6 +79,11 @@ int handle_smtp_session(int new_sd, struct __data *data, struct __config *cfg){
|
||||
syslog(LOG_PRIORITY, "%s", ERR_MYSQL_CONNECT);
|
||||
#endif
|
||||
|
||||
if(db_conn == 0){
|
||||
send(new_sd, SMTP_RESP_421_ERR_TMP, strlen(SMTP_RESP_421_ERR_TMP), 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
gettimeofday(&tv1, &tz);
|
||||
|
||||
|
||||
Reference in new issue
Block a user