Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
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
Jacklull
k3s
Commits
5b6a7c60
Commit
5b6a7c60
authored
Dec 17, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18524 from thockin/kube-proxy-close
Auto commit by PR queue bot
parents
bf5f69bf
ad077094
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
proxysocket.go
pkg/proxy/userspace/proxysocket.go
+5
-5
No files found.
pkg/proxy/userspace/proxysocket.go
View file @
5b6a7c60
...
@@ -153,8 +153,6 @@ func proxyTCP(in, out *net.TCPConn) {
...
@@ -153,8 +153,6 @@ func proxyTCP(in, out *net.TCPConn) {
go
copyBytes
(
"from backend"
,
in
,
out
,
&
wg
)
go
copyBytes
(
"from backend"
,
in
,
out
,
&
wg
)
go
copyBytes
(
"to backend"
,
out
,
in
,
&
wg
)
go
copyBytes
(
"to backend"
,
out
,
in
,
&
wg
)
wg
.
Wait
()
wg
.
Wait
()
in
.
Close
()
out
.
Close
()
}
}
func
copyBytes
(
direction
string
,
dest
,
src
*
net
.
TCPConn
,
wg
*
sync
.
WaitGroup
)
{
func
copyBytes
(
direction
string
,
dest
,
src
*
net
.
TCPConn
,
wg
*
sync
.
WaitGroup
)
{
...
@@ -162,11 +160,13 @@ func copyBytes(direction string, dest, src *net.TCPConn, wg *sync.WaitGroup) {
...
@@ -162,11 +160,13 @@ func copyBytes(direction string, dest, src *net.TCPConn, wg *sync.WaitGroup) {
glog
.
V
(
4
)
.
Infof
(
"Copying %s: %s -> %s"
,
direction
,
src
.
RemoteAddr
(),
dest
.
RemoteAddr
())
glog
.
V
(
4
)
.
Infof
(
"Copying %s: %s -> %s"
,
direction
,
src
.
RemoteAddr
(),
dest
.
RemoteAddr
())
n
,
err
:=
io
.
Copy
(
dest
,
src
)
n
,
err
:=
io
.
Copy
(
dest
,
src
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"I/O error: %v"
,
err
)
if
!
isClosedError
(
err
)
{
glog
.
Errorf
(
"I/O error: %v"
,
err
)
}
}
}
glog
.
V
(
4
)
.
Infof
(
"Copied %d bytes %s: %s -> %s"
,
n
,
direction
,
src
.
RemoteAddr
(),
dest
.
RemoteAddr
())
glog
.
V
(
4
)
.
Infof
(
"Copied %d bytes %s: %s -> %s"
,
n
,
direction
,
src
.
RemoteAddr
(),
dest
.
RemoteAddr
())
dest
.
Close
Write
()
dest
.
Close
()
src
.
Close
Read
()
src
.
Close
()
}
}
// udpProxySocket implements proxySocket. Close() is implemented by net.UDPConn. When Close() is called,
// udpProxySocket implements proxySocket. Close() is implemented by net.UDPConn. When Close() is called,
...
...
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