diff options
| -rw-r--r-- | common/btio.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/common/btio.c b/common/btio.c index dbbc4287..9ff407fd 100644 --- a/common/btio.c +++ b/common/btio.c @@ -148,10 +148,8 @@ static gboolean connect_cb(GIOChannel *io, GIOCondition cond,  	conn->connect(io, gerr, conn->user_data); -	if (gerr) { -		g_io_channel_shutdown(io, FALSE, NULL); +	if (gerr)  		g_error_free(gerr); -	}  	return FALSE;  } @@ -177,6 +175,9 @@ static gboolean server_cb(GIOChannel *io, GIOCondition cond,  	cli_io = g_io_channel_unix_new(cli_sock); +	g_io_channel_set_close_on_unref(cli_io, TRUE); +	g_io_channel_set_flags(cli_io, G_IO_FLAG_NONBLOCK, NULL); +  	if (server->confirm)  		server->confirm(cli_io, server->user_data);  	else @@ -1138,6 +1139,7 @@ static GIOChannel *create_io(BtIOType type, gboolean server,  	io = g_io_channel_unix_new(sock); +	g_io_channel_set_close_on_unref(io, TRUE);  	g_io_channel_set_flags(io, G_IO_FLAG_NONBLOCK, NULL);  	return io;  | 
