Got rid of logging errors where it would say the connection did not close cleanly but it actually did.