diff options
-rw-r--r-- | ext/sockets/sockets.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 015cc099c4..c4a9319595 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -56,7 +56,6 @@ # define set_errno(a) (errno = a) # define set_h_errno(a) (h_errno = a) #else /* windows */ -# include <winsock.h> # include "php_sockets.h" # include "php_sockets_win.h" # define IS_INVALID_SOCKET(a) (a->bsd_socket == INVALID_SOCKET) @@ -755,6 +754,8 @@ PHP_FUNCTION(socket_read) retval = (*read_function)(php_sock->bsd_socket, tmpbuf, length); #else retval = recv(php_sock->bsd_socket, tmpbuf, length, 0); + /* i don't know why, but it _does_ fix a memleak */ + SleepEx(1, TRUE); #endif if (retval == -1) { |