fix close on closed socket_writer (#2748)
This commit is contained in:
committed by
Daniel Nelson
parent
b0a2e8e1bd
commit
ce203dc687
@@ -143,7 +143,7 @@ func TestSocketWriter_Write_err(t *testing.T) {
|
||||
|
||||
// close the socket to generate an error
|
||||
lconn.Close()
|
||||
sw.Close()
|
||||
sw.Conn.Close()
|
||||
err = sw.Write(metrics)
|
||||
require.Error(t, err)
|
||||
assert.Nil(t, sw.Conn)
|
||||
|
||||
Reference in New Issue
Block a user