Skip to content

Commit

Permalink
Avoid closing nil tunnel readers #749
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Jul 26, 2022
1 parent a1d3cbd commit fee6ee8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion implant/sliver/transports/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ func (c *Tunnel) IncWriteSequence() {
// Close - close tunnel reader and writer
func (c *Tunnel) Close() {
for _, rc := range c.Readers {
rc.Close()
if rc != nil {
rc.Close()
}
}
c.Writer.Close()
}

0 comments on commit fee6ee8

Please sign in to comment.