 The end of the war in 1783 meant that the "Barrington" was paid off and Cunningham retired from active naval life.He returned to service in 1788 when he joined Admiral Sir William Cornwallis' flagship .He served for several years in the East Indies, before being promoted to commander and given command of the 16-gun sloop .