diff options
| -rw-r--r-- | sdpd/server.c | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/sdpd/server.c b/sdpd/server.c index fcdbf49f..1524d1c0 100644 --- a/sdpd/server.c +++ b/sdpd/server.c @@ -151,11 +151,16 @@ static gboolean io_session_event(GIOChannel *chan, GIOCondition cond, gpointer d  	uint8_t *buf;  	int sk, len, size; -	if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) +	if (cond & G_IO_NVAL)  		return FALSE;  	sk = g_io_channel_unix_get_fd(chan); +	if (cond & (G_IO_HUP | G_IO_ERR)) { +		sdp_svcdb_collect_all(sk); +		return FALSE; +	} +  	len = recv(sk, &hdr, sizeof(sdp_pdu_hdr_t), MSG_PEEK);  	if (len <= 0) {  		sdp_svcdb_collect_all(sk); | 
