android-cuttlefish
android-cuttlefish copied to clipboard
Fix double closure of sockets while proxying ADB
While proxying ADB, wsWrapper.Close() is executed twice, at deferred function and inside go routine. Call wsWrapper.Close() only at go routine that writes data to the wsWrapper.
Also move tcpConn.Close() after io.Copy(...) to avoid confusion.