Don't close connection immediately on write error, so the callers don't
authorSenko Rasic <senko.rasic@collabora.co.uk>
Tue, 06 Nov 2007 12:31:33 +0100
changeset 316 ac545b623d43
parent 315 eafeecd05c9a
child 317 e7ceb196a573
Don't close connection immediately on write error, so the callers don't have to guard against that case. The connection will be closed after the next read error anyways.
loudmouth/lm-connection.c
--- a/loudmouth/lm-connection.c	Wed Oct 31 15:34:52 2007 +0000
+++ b/loudmouth/lm-connection.c	Tue Nov 06 12:31:33 2007 +0100
@@ -403,10 +403,6 @@
 	b_written = lm_socket_do_write (connection->socket, str, len);
 
 	if (b_written < 0) {
-		connection_do_close (connection);
-		connection_signal_disconnect (connection, 
-					      LM_DISCONNECT_REASON_ERROR);
-
 		g_set_error (error,
 			     LM_ERROR,
 			     LM_ERROR_CONNECTION_FAILED,