summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2020-10-27 03:06:27 +0000
committerGerrit Code Review <gerrit@review>2020-10-27 03:06:27 +0000
commitac76bee17d44c17c8867972b1c5e108b7a32ce7f (patch)
treee6cda8901c6f32006d2d523e7c5eaa5a81842c65 /gdhcp
parent72d860550e92489f203362d5fba7ae372427ed42 (diff)
parentd56fb241d6eb569acd54848d83d20d5bda3cf3cc (diff)
downloadconnman-ac76bee17d44c17c8867972b1c5e108b7a32ce7f.tar.gz
connman-ac76bee17d44c17c8867972b1c5e108b7a32ce7f.tar.bz2
connman-ac76bee17d44c17c8867972b1c5e108b7a32ce7f.zip
Merge "[gdhcp/client] Reopen socket GIO channel when failed" into tizensubmit/tizen/20201028.023046accepted/tizen/unified/20201029.124906
Diffstat (limited to 'gdhcp')
-rwxr-xr-xgdhcp/client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index 22bbc8e2..2bdc6163 100755
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -2324,6 +2324,14 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
if (condition & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) {
dhcp_client->listener_watch = 0;
+#if defined TIZEN_EXT
+ /* re-register event listener when socket failed */
+ int retry_count = 0;
+ int ret = -1;
+ while (retry_count++ < GIO_SOCKET_RETRY_COUNT && ret < 0)
+ ret = switch_listening_mode(dhcp_client,
+ dhcp_client->type);
+#endif /* defined TIZEN_EXT */
return FALSE;
}