Permalink
Browse files

Fixed bug #18772 (setTimeout usecs not honored).

  • Loading branch information...
1 parent 90ef823 commit 61327e6fa73c59d9d4d4b5eb7cc48807471aa66b @adoy adoy committed Oct 13, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 stomp.c
View
@@ -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;
+
+ tv.tv_sec = stomp->options.read_timeout_sec;
+ tv.tv_usec = stomp->options.read_timeout_usec;
- n = php_pollfd_for_ms(stomp->fd, PHP_POLLREADABLE, stomp->options.read_timeout_sec * 1000 + 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) {

0 comments on commit 61327e6

Please sign in to comment.