Repository: go-delve/delve (go)

Issue:
Cannot install @master
Master seems to be broken and cannot build.

Using linux/amd64 with Go v1.17.4

Noticed when trying to update tools via vscode. Then replicated in command line:

Simply run:
```bash
go install github.com/go-delve/delve/cmd/dlv@master
```
and got as a result:
```
# github.com/go-delve/delve/service/dap
../../../go/pkg/mod/github.com/go-delve/delve@v1.7.4-0.20211207172355-a4ac69e87df3/service/dap/server.go:502:26: invalid type assertion: s.conn.(net.Conn) (non-interface type *connection on left)
```

Seems to be a compiler error.

Pull request description:
service/dap: fix compile error from merge conflict
Fixes #2817

Patch:
diff --git a/service/dap/server.go b/service/dap/server.go
index 3a254994..c9001351 100644
--- a/service/dap/server.go
+++ b/service/dap/server.go
@@ -499,7 +499,7 @@ func (s *Session) address() string {
 	if s.config.Listener != nil {
 		return s.config.Listener.Addr().String()
 	}
-	if netconn, ok := s.conn.(net.Conn); ok {
+	if netconn, ok := s.conn.ReadWriteCloser.(net.Conn); ok {
 		return netconn.LocalAddr().String()
 	}
 	return ""


Test patch:
diff --git a/cmd/dlv/dlv_test.go b/cmd/dlv/dlv_test.go
index e9f101fa..b3f9b6d3 100644
--- a/cmd/dlv/dlv_test.go
+++ b/cmd/dlv/dlv_test.go
@@ -867,7 +867,7 @@ func TestRemoteDAPClientAfterContinue(t *testing.T) {
 	c.ContinueRequest(1)
 	c.ExpectContinueResponse(t)
 	c.DisconnectRequest()
-	c.ExpectOutputEventClosingClient(t)
+	c.ExpectOutputEventClosingClient(t, "running")
 	c.ExpectDisconnectResponse(t)
 	c.ExpectTerminatedEvent(t)
 	c.Close()