Fixed bug #18772 (setTimeout usecs not honored).

v1.1
Pierrick Charron 2010-10-13 03:13:19 +00:00
parent 90ef82399f
commit 61327e6fa7
1 changed files with 5 additions and 1 deletions

View File

@ -569,8 +569,12 @@ int stomp_valid_receipt(stomp_t *stomp, stomp_frame_t *frame) {
int stomp_select(stomp_t *stomp)
{
int n;
struct timeval tv;
n = php_pollfd_for_ms(stomp->fd, PHP_POLLREADABLE, stomp->options.read_timeout_sec * 1000 + stomp->options.read_timeout_usec);
tv.tv_sec = stomp->options.read_timeout_sec;
tv.tv_usec = stomp->options.read_timeout_usec;
n = php_pollfd_for(stomp->fd, PHP_POLLREADABLE, &tv);
if (n < 1) {
#if !defined(PHP_WIN32) && !(defined(NETWARE) && defined(USE_WINSOCK))
if (n == 0) {