Wrapped Socket in try-with-resources block