Hello list, recently I've stumbled upon something that I think might be a bluez bug. My nokia phone was messed up, so it dropped rfcomm connections immediately after they were established. This caused my glibmm (glib2) based program to exit because of a glib error. After researching a bit I found out, that I was flushing a glib io channel after the channel was polled for IO_OUT, which is right. The flush caused a write() to the socket and glib expects write() to return either a negative number (an error) or positive > 0, a return = 0 is not expected probably because one should first wait for the IO_OUT event. What was happening is that the connection was being dropped right after the socket was polled and this caused glib to crash most of the time. Should't bluez close the socket and return < 0 instead of returning 0? I've attached a small program to better demonstrate what happened. I've also attached a copy of the email which I sent to the gtkmm mailing list, since I first thought it was a glib issue. Thanks