Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Snowflake
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
trinity-1686a
Snowflake
Commits
50646698
Verified
Commit
50646698
authored
3 years ago
by
shelikhoo
Committed by
Cecylia Bocovich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Suppress connection end log output
This is an amendment of
tpo/anti-censorship/pluggable-transports/snowflake!30
parent
b35a79ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/lib/snowflake.go
+2
-1
2 additions, 1 deletion
server/lib/snowflake.go
server/server.go
+3
-2
3 additions, 2 deletions
server/server.go
with
5 additions
and
3 deletions
server/lib/snowflake.go
+
2
−
1
View file @
50646698
...
...
@@ -38,6 +38,7 @@ package snowflake_server
import
(
"crypto/tls"
"errors"
"fmt"
"io"
"log"
...
...
@@ -262,7 +263,7 @@ func (l *SnowflakeListener) acceptSessions(ln *kcp.Listener) error {
go
func
()
{
defer
conn
.
Close
()
err
:=
l
.
acceptStreams
(
conn
)
if
err
!=
nil
&&
err
!=
io
.
ErrClosedPipe
{
if
err
!=
nil
&&
!
err
ors
.
Is
(
err
,
io
.
ErrClosedPipe
)
{
log
.
Printf
(
"acceptStreams: %v"
,
err
)
}
}()
...
...
This diff is collapsed.
Click to expand it.
server/server.go
+
3
−
2
View file @
50646698
...
...
@@ -3,6 +3,7 @@
package
main
import
(
"errors"
"flag"
"fmt"
"io"
...
...
@@ -47,7 +48,7 @@ func proxy(local *net.TCPConn, conn net.Conn) {
wg
.
Add
(
2
)
go
func
()
{
if
_
,
err
:=
io
.
Copy
(
conn
,
local
);
err
!=
nil
&&
err
!=
io
.
ErrClosedPipe
{
if
_
,
err
:=
io
.
Copy
(
conn
,
local
);
err
!=
nil
&&
!
err
ors
.
Is
(
err
,
io
.
ErrClosedPipe
)
{
log
.
Printf
(
"error copying ORPort to WebSocket %v"
,
err
)
}
local
.
CloseRead
()
...
...
@@ -55,7 +56,7 @@ func proxy(local *net.TCPConn, conn net.Conn) {
wg
.
Done
()
}()
go
func
()
{
if
_
,
err
:=
io
.
Copy
(
local
,
conn
);
err
!=
nil
&&
err
!=
io
.
ErrClosedPipe
{
if
_
,
err
:=
io
.
Copy
(
local
,
conn
);
err
!=
nil
&&
!
err
ors
.
Is
(
err
,
io
.
ErrClosedPipe
)
{
log
.
Printf
(
"error copying WebSocket to ORPort %v"
,
err
)
}
local
.
CloseWrite
()
...
...
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