Commits

Tuukka Norri committed 7076890

Fixed connection closing (fixes #52)

Comments (0)

Files changed (1)

Framework/Sources/PGTSConnectionPrivate.m

 - (void) disconnectAndCleanup
 {
 	//N.B. No locking
-	[socket closeFile];
-	[socket release];
-	socket = nil;
 	if (NULL != cancelRequest)
 	{
 		PQfreeCancel (cancelRequest);
 	}
 	PQfinish (connection);
 	connection = NULL;
+	[socket closeFile];
+	[socket release];
+	socket = nil;
 }	
 @end