//Solve potential deadlock caused by COMM_FAILURE.
//The strategy is getting write_lock before sync connect_sync when you need both of them.
getWriteLock();
//Removed. See above.
--
//getWriteLock();
close();
//Removed. See issue ID 708
//close();