diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-02-10 17:50:06 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-02-10 17:50:06 +0200 |
commit | 7b1704e3e274de93cfd8bef3221c099cc186dc69 (patch) | |
tree | 7d6ac1498aebd4e91d49bd52c52687bb6ba56f62 /libmysql | |
parent | a285b4395c1e81759b58f43593bf8517cf6ebbd2 (diff) | |
download | mariadb-git-7b1704e3e274de93cfd8bef3221c099cc186dc69.tar.gz |
connect timeout bug fix
libmysql/libmysql.c:
This is a fix for a bug in connect_timeout.
This bug manifested itself on operating systems that do support poll()
system call, which resulted in a timeout twice the value specified.
That is because timeout executed on both select() and poll().
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 179a942828c..af964bb9bfa 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -175,6 +175,9 @@ static int connect2(my_socket s, const struct sockaddr *name, uint namelen, * implementations of select that don't adjust tv upon * failure to reflect the time remaining */ +#ifdef HAVE_POLL + return(0); +#endif start_time = time(NULL); for (;;) { |