Created a matcher for checking if the connection is closed or not.