Lock reconnecting method for both Writer and Reader of client.