ObjFW  Diff

Differences From Artifact [4722d3e575]:

To Artifact [8dbe0324ed]:


125
126
127
128
129
130
131



132
133
134
135
136
137
138
139
140
141
142
143
	[_host release];

	[super dealloc];
}

- (void)close
{



	if (_handshakeDone)
		gnutls_bye(_session, GNUTLS_SHUT_WR);

	if (_session != NULL)
		gnutls_deinit(_session);

	if (_credentials != NULL)
		gnutls_certificate_free_credentials(_credentials);

	_session = NULL;
	_credentials = NULL;
	_handshakeDone = false;







>
>
>



<
|







125
126
127
128
129
130
131
132
133
134
135
136
137

138
139
140
141
142
143
144
145
	[_host release];

	[super dealloc];
}

- (void)close
{
	if (_session == NULL)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (_handshakeDone)
		gnutls_bye(_session, GNUTLS_SHUT_WR);


	gnutls_deinit(_session);

	if (_credentials != NULL)
		gnutls_certificate_free_credentials(_credentials);

	_session = NULL;
	_credentials = NULL;
	_handshakeDone = false;