Listen for error on connection, close #4

This commit is contained in:
Anatoliy Chakkaev 2013-01-30 22:14:29 +07:00
parent e78fab6f5b
commit 65a0baa633
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,10 @@ exports.initialize = function initializeSchema(schema, callback) {
socketPath: s.socketPath
});
schema.client.on('error', function (err) {
schema.emit('error', err);
});
schema.adapter = new MySQL(schema.client);
schema.adapter.schema = schema;
// schema.client.query('SET TIME_ZONE = "+04:00"', callback);