I checked in F. B. Heitman's /Historical Register of Officers of Continental Army . . . (1893)/ for a Capt. Connelly (similar spellings) in the 4th PA Regiment (Continental) and found that there was a Capt. Robert Connelly in this 4th PA Regiment.
In Compiled Service Records for soldiers of the 4th PA Regiment (Continental) there are listings for what may be either one man with a suffix misread, or two men: a William Brown Sr. with a month's service in 1777 and a William Brown Jr. whose full service was not clear in a quick look, but who is listed as having deserted.Both Browns were in Capt. Robert Connelly's Company.
You can look at the Compiled Service Records either on footnote.com or Ancestry.com, they have free trial periods and your local library may subscribe to one or both for patron use.Images of the surviving rolls and rosters for the 4th PA Regiment (Continental) are also on Ancestry.com.
You can also ask your library's Inter-Library-Loan dept. to borrow the microfilm of these surviving rosters (from which the Compiled Service Records were extracted), which are on microfilm roll 81, National Archives Micropublication #246, "Revolutionary War Rolls."