Skip to content

Instantly share code, notes, and snippets.

@Sannis
Created January 26, 2011 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sannis/796981 to your computer and use it in GitHub Desktop.
Save Sannis/796981 to your computer and use it in GitHub Desktop.
// Behavior explanation: http://dev.mysql.com/doc/refman/5.1/en/auto-reconnect.html
// Set MYSQL_OPT_RECONNECT
var conn = mysql_libmysqlclient.createConnectionSync();
conn.initSync();
conn.setOptionSync(conn.MYSQL_OPT_RECONNECT, 1);
conn.realConnectSync(cfg.host, cfg.user, cfg.password);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment