s_strncpy(addr.sun_path, sockpath, strlen(sockpath));
int slen = offsetof(struct sockaddr_un, sun_path) + strlen(sockpath);
while (connect(sock, (struct sockaddr *)&addr, slen) == -1
- && trycnt < 100) {
+ && trycnt < 300) {
D("try to connect socket %s, %d times.\n", sockpath, trycnt++);
/* sleep maximum 100 times */
usleep(10000);
}
- if (trycnt == 100) {
+ if (trycnt == 300) {
E("failed to connect, errno: %d\n", errno);
if (sdb_close(sock) == -1) {
E("close sock error, %d\n", errno);