1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

remove unnecessary goroutine

This commit is contained in:
v2ray 2016-07-29 11:50:02 +02:00
parent b8421f659f
commit 53cdcfdc2b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -41,10 +41,10 @@ func TestConnectionReadWrite(t *testing.T) {
downReader, downWriter := io.Pipe() downReader, downWriter := io.Pipe()
connClient := NewConnection(1, upWriter, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 1}, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 2}, NewSimpleAuthenticator()) connClient := NewConnection(1, upWriter, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 1}, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 2}, NewSimpleAuthenticator())
go connClient.FetchInputFrom(downReader) connClient.FetchInputFrom(downReader)
connServer := NewConnection(1, downWriter, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 2}, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 1}, NewSimpleAuthenticator()) connServer := NewConnection(1, downWriter, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 2}, &net.UDPAddr{IP: v2net.LocalHostIP.IP(), Port: 1}, NewSimpleAuthenticator())
go connServer.FetchInputFrom(upReader) connServer.FetchInputFrom(upReader)
totalWritten := 1024 * 1024 totalWritten := 1024 * 1024
clientSend := make([]byte, totalWritten) clientSend := make([]byte, totalWritten)