Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
f4ffc1e2
Commit
f4ffc1e2
authored
11 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
fixes for close flush
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
e7016aae
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/output.c
+2
-1
2 additions, 1 deletion
lib/output.c
lib/service.c
+6
-1
6 additions, 1 deletion
lib/service.c
with
8 additions
and
2 deletions
lib/output.c
+
2
−
1
View file @
f4ffc1e2
...
@@ -153,9 +153,10 @@ handle_truncated_send:
...
@@ -153,9 +153,10 @@ handle_truncated_send:
lwsl_info
(
"***** %x partial send completed
\n
"
,
wsi
);
lwsl_info
(
"***** %x partial send completed
\n
"
,
wsi
);
/* done with it, but don't free it */
/* done with it, but don't free it */
n
=
real_len
;
n
=
real_len
;
if
(
wsi
->
state
==
WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE
)
if
(
wsi
->
state
==
WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE
)
{
lwsl_info
(
"***** %x signalling to close now
\n
"
,
wsi
);
lwsl_info
(
"***** %x signalling to close now
\n
"
,
wsi
);
return
-
1
;
/* retry closing now */
return
-
1
;
/* retry closing now */
}
}
}
/* always callback on writeable */
/* always callback on writeable */
libwebsocket_callback_on_writable
(
libwebsocket_callback_on_writable
(
...
...
This diff is collapsed.
Click to expand it.
lib/service.c
+
6
−
1
View file @
f4ffc1e2
...
@@ -42,7 +42,12 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
...
@@ -42,7 +42,12 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
}
}
/* leave POLLOUT active either way */
/* leave POLLOUT active either way */
return
0
;
return
0
;
}
}
else
if
(
wsi
->
state
==
WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE
)
{
lwsl_info
(
"***** %x signalling to close in POLLOUT handler
\n
"
,
wsi
);
return
-
1
;
/* retry closing now */
}
m
=
lws_ext_callback_for_each_active
(
wsi
,
LWS_EXT_CALLBACK_IS_WRITEABLE
,
m
=
lws_ext_callback_for_each_active
(
wsi
,
LWS_EXT_CALLBACK_IS_WRITEABLE
,
NULL
,
0
);
NULL
,
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment