Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
2bc36fac
Commit
2bc36fac
authored
May 21, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2372 from libgit2/cmn/fetch-terminate
smart: send a flush when we disconnect
parents
58532ed0
ac11219b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/transports/smart.c
+12
-0
No files found.
src/transports/smart.c
View file @
2bc36fac
...
@@ -272,6 +272,18 @@ static int git_smart__close(git_transport *transport)
...
@@ -272,6 +272,18 @@ static int git_smart__close(git_transport *transport)
unsigned
int
i
;
unsigned
int
i
;
git_pkt
*
p
;
git_pkt
*
p
;
int
ret
;
int
ret
;
git_smart_subtransport_stream
*
stream
;
const
char
flush
[]
=
"0000"
;
/*
* If we're still connected at this point and not using RPC,
* we should say goodbye by sending a flush, or git-daemon
* will complain that we disconnected unexpectedly.
*/
if
(
t
->
connected
&&
!
t
->
rpc
&&
!
t
->
wrapped
->
action
(
&
stream
,
t
->
wrapped
,
t
->
url
,
GIT_SERVICE_UPLOADPACK
))
{
t
->
current_stream
->
write
(
t
->
current_stream
,
flush
,
4
);
}
ret
=
git_smart__reset_stream
(
t
,
true
);
ret
=
git_smart__reset_stream
(
t
,
true
);
...
...
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