From ed3d198b2c8a771bd1f697f5d0b6bcff2d17f7b4 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sun, 25 Nov 2018 17:00:11 +0800 Subject: [PATCH] Fix: chrome crash when using SwitchyOmega by reject rule (#47) * Fix: chrome crash when using SwitchyOmega by reject rule --- adapters/outbound/reject.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/outbound/reject.go b/adapters/outbound/reject.go index ae26022d..5a5357c0 100644 --- a/adapters/outbound/reject.go +++ b/adapters/outbound/reject.go @@ -50,7 +50,7 @@ func NewReject() *Reject { type NopConn struct{} func (rw *NopConn) Read(b []byte) (int, error) { - return len(b), nil + return 0, io.EOF } func (rw *NopConn) Write(b []byte) (int, error) {