فهرست منبع

Remove panic recover

See: https://github.com/Psiphon-Labs/psiphon-tunnel-core/commit/6c16db7381461b53fd4ef225f239381a8293b34b
Rod Hynes 4 سال پیش
والد
کامیت
4d3ff3d989
1فایلهای تغییر یافته به همراه0 افزوده شده و 11 حذف شده
  1. 0 11
      psiphon/server/udp.go

+ 0 - 11
psiphon/server/udp.go

@@ -25,7 +25,6 @@ import (
 	"fmt"
 	"io"
 	"net"
-	"runtime/debug"
 	"sync"
 	"sync/atomic"
 
@@ -92,16 +91,6 @@ func (mux *udpPortForwardMultiplexer) run() {
 	// When the client disconnects or the server shuts down, the channel will close and
 	// readUdpgwMessage will exit with EOF.
 
-	// Recover from and log any unexpected panics caused by udpgw input handling bugs.
-	// Note: this covers the run() goroutine only and not relayDownstream() goroutines.
-	defer func() {
-		if e := recover(); e != nil {
-			err := errors.Tracef(
-				"udpPortForwardMultiplexer panic: %s: %s", e, debug.Stack())
-			log.WithTraceFields(LogFields{"error": err}).Warning("run failed")
-		}
-	}()
-
 	buffer := make([]byte, udpgwProtocolMaxMessageSize)
 	for {
 		// Note: message.packet points to the reusable memory in "buffer".