aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/simulations/adapters/inproc.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/simulations/adapters/inproc.go')
-rw-r--r--p2p/simulations/adapters/inproc.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/simulations/adapters/inproc.go b/p2p/simulations/adapters/inproc.go
index c1b032a0d..b0fdf49b9 100644
--- a/p2p/simulations/adapters/inproc.go
+++ b/p2p/simulations/adapters/inproc.go
@@ -353,8 +353,7 @@ func (sn *SimNode) NodeInfo() *p2p.NodeInfo {
}
func setSocketBuffer(conn net.Conn, socketReadBuffer int, socketWriteBuffer int) error {
- switch v := conn.(type) {
- case *net.UnixConn:
+ if v, ok := conn.(*net.UnixConn); ok {
err := v.SetReadBuffer(socketReadBuffer)
if err != nil {
return err