From 3d13bba4126864771cd534e8947a73620805511a Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 30 May 2017 17:33:41 +0200 Subject: [PATCH] allow error on set deadline --- proxy/vmess/inbound/inbound.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index 426c25c0..75fc44b5 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -174,7 +174,9 @@ func transferResponse(timer signal.ActivityTimer, session *encoding.ServerSessio // Process implements proxy.Inbound.Process(). func (v *Handler) Process(ctx context.Context, network net.Network, connection internet.Connection, dispatcher dispatcher.Interface) error { - common.Must(connection.SetReadDeadline(time.Now().Add(time.Second * 8))) + if err := connection.SetReadDeadline(time.Now().Add(time.Second * 8)); err != nil { + return err + } reader := buf.NewBufferedReader(connection)