Fix: Bad connection error on mysql connection reset.

Merged Akshay Bharambe requested to merge ab_Fix_ConnReset into devbranch