Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
aa6b2482
Commit
aa6b2482
authored
May 13, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Poll for FD_CLOSE even if we cannot receive more data.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7529f46a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
sock.c
dlls/ws2_32/tests/sock.c
+3
-3
sock.c
server/sock.c
+1
-2
No files found.
dlls/ws2_32/tests/sock.c
View file @
aa6b2482
...
...
@@ -4455,12 +4455,12 @@ static void test_close_events(struct event_test_ctx *ctx)
check_events
(
ctx
,
0
,
0
,
0
);
select_events
(
ctx
,
server
,
FD_ACCEPT
|
FD_CLOSE
|
FD_CONNECT
|
FD_OOB
|
FD_READ
);
if
(
ctx
->
is_message
)
check_events
_todo_msg
(
ctx
,
FD_CLOSE
,
0
,
200
);
check_events
(
ctx
,
FD_CLOSE
,
0
,
200
);
check_events
(
ctx
,
0
,
0
,
0
);
select_events
(
ctx
,
server
,
0
);
select_events
(
ctx
,
server
,
FD_ACCEPT
|
FD_CLOSE
|
FD_CONNECT
|
FD_OOB
|
FD_READ
);
if
(
ctx
->
is_message
)
check_events
_todo_msg
(
ctx
,
FD_CLOSE
,
0
,
200
);
check_events
(
ctx
,
FD_CLOSE
,
0
,
200
);
check_events
(
ctx
,
0
,
0
,
0
);
ret
=
recv
(
server
,
buffer
,
5
,
0
);
...
...
@@ -4553,7 +4553,7 @@ static void test_close_events(struct event_test_ctx *ctx)
check_events
(
ctx
,
0
,
0
,
200
);
select_events
(
ctx
,
server
,
FD_ACCEPT
|
FD_CLOSE
|
FD_CONNECT
|
FD_OOB
|
FD_READ
);
check_events_todo
_event
(
ctx
,
FD_CLOSE
,
0
,
200
);
check_events_todo
(
ctx
,
FD_CLOSE
,
0
,
200
);
closesocket
(
server
);
}
...
...
server/sock.c
View file @
aa6b2482
...
...
@@ -786,8 +786,7 @@ static int sock_get_poll_events( struct fd *fd )
else
if
(
smask
&
FD_READ
||
(
sock
->
state
&
FD_WINE_LISTENING
&&
mask
&
FD_ACCEPT
))
ev
|=
POLLIN
|
POLLPRI
;
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication for stream sockets. */
else
if
(
sock
->
type
==
WS_SOCK_STREAM
&&
(
sock
->
state
&
FD_READ
)
&&
(
mask
&
FD_CLOSE
)
&&
!
(
sock
->
reported_events
&
FD_READ
))
else
if
(
sock
->
type
==
WS_SOCK_STREAM
&&
(
mask
&
FD_CLOSE
)
&&
!
(
sock
->
reported_events
&
FD_READ
))
ev
|=
POLLIN
;
if
(
async_queued
(
&
sock
->
write_q
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment