mirror of git://git.sysmocom.de/ofono
gatchat: remove write watcher on a disconnect
There's a small probability that we call chat_wakeup_writer just before the channel disonnects. When this happens the write watcher still fires causing a potential crash.
This commit is contained in:
parent
5774e9fa53
commit
99107c6c9d
|
@ -315,6 +315,9 @@ static gboolean io_shutdown(GAtIO *io)
|
|||
if (io->read_watch > 0)
|
||||
g_source_remove(io->read_watch);
|
||||
|
||||
if (io->write_watch > 0)
|
||||
g_source_remove(io->write_watch);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue