annotate auto/os/win32 @ 7098:7bfbf73db920

Stream: relaxed next upstream condition (ticket #1317). When switching to a next upstream, some buffers could be stuck in the middle of the filter chain. A condition existed that raised an error when this happened. As it turned out, this condition prevented switching to a next upstream if ssl preread was used with the TCP protocol (see the ticket). In fact, the condition does not make sense for TCP, since after successful connection to an upstream switching to another upstream never happens. As for UDP, the issue with stuck buffers is unlikely to happen, but is still possible. Specifically, if a filter delays sending data to upstream. The condition can be relaxed to only check the "buffered" bitmask of the upstream connection. The new condition is simpler and fixes the ticket issue as well. Additionally, the upstream_out chain is now reset for UDP prior to connecting to a new upstream to prevent repeating the client data twice.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 11 Sep 2017 15:32:31 +0300
parents b7b7f3a0cc28
children f3ff79ae31d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 2814
diff changeset
3 # Copyright (C) Nginx, Inc.
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
509
9b8c906f6e63 nginx-0.1.29-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 469
diff changeset
6 have=NGX_WIN32 . auto/have_headers
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 CORE_INCS="$WIN32_INCS"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9 CORE_DEPS="$WIN32_DEPS"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10 CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 OS_CONFIG="$WIN32_CONFIG"
461
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
12 NGX_ICONS="$NGX_WIN32_ICONS"
2813
c00763aa5e1b divide select module into two modules: Unix and Win32 ones
Igor Sysoev <igor@sysoev.ru>
parents: 2731
diff changeset
13 SELECT_SRCS=$WIN32_SELECT_SRCS
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6125
diff changeset
15 ngx_pic_opt=
7031
b7b7f3a0cc28 Configure: use .exe for binaries for all win32 compilers.
Orgad Shaneh <orgads@gmail.com>
parents: 6724
diff changeset
16 ngx_binext=".exe"
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6125
diff changeset
17
5360
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
18 case "$NGX_CC_NAME" in
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
19
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
20 gcc)
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
21 CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6125
diff changeset
22 MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols"
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6125
diff changeset
23 MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a"
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6125
diff changeset
24 MODULE_LINK="-shared -L $NGX_OBJS -lnginx"
5360
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
25 ;;
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
26
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
27 *)
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
28 CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
29 ;;
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
30
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
31 esac
3d2d3e1cf427 Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
32
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
33 EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
34 EVENT_FOUND=YES
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
35
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
36 if [ $EVENT_SELECT = NO ]; then
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
37 CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
38 EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39 fi
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40
6724
a6d116645c51 Configure: removed the --with-ipv6 option.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6383
diff changeset
41 have=NGX_HAVE_INET6 . auto/have
2814
219aa0b0fd58 IPv6 for Win32
Igor Sysoev <igor@sysoev.ru>
parents: 2813
diff changeset
42
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
43 have=NGX_HAVE_IOCP . auto/have