Skip to content

Commit

Permalink
fix ListenAndServe
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Jul 14, 2020
1 parent 8d88ec4 commit f5fefc5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ func (r *Relay) ListenAndServe() error {
go func() {
errChan <- r.RunLocalTCPServer()
}()
go func() {
errChan <- r.RunLocalUDPServer()
}()
// NOTE 现在只有raw支持udp
if r.TransportType == Transport_RAW {
go func() {
errChan <- r.RunLocalUDPServer()
}()
}
} else if r.ListenType == Listen_WS {
go func() {
errChan <- r.RunLocalWSServer()
Expand Down

0 comments on commit f5fefc5

Please sign in to comment.