Fixed that accepted client socket is not closed when it failed to write to remote
authorshingil.kang <shingil.kang@samsung.com>
Mon, 14 Sep 2015 05:57:24 +0000 (14:57 +0900)
committershingil.kang <shingil.kang@samsung.com>
Mon, 14 Sep 2015 06:03:21 +0000 (15:03 +0900)
- if many client socket is not closed after the fail of writting,
  it cause server not to accept any connection from client.

Change-Id: I199bc44d9949cedffdcc3f595cdff7bf73fd97ed
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
src/sockets.c

index 1239c0ed1f3285a6a41cf759fb3050fea103df58..7ee1e5cda1a14139322db476af74ca8932fa0c2c 100755 (executable)
@@ -1262,6 +1262,7 @@ static int smart_socket_enqueue(SDB_SOCKET *s, PACKET *p)
             }
             LOG_ERROR("LS(%X) get no transport", s->local_id);
             sendfailmsg(s->fd, err_str);
+            goto fail;
         }
         p->len = 0;
         return 0;