delegate for connection.close added