aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/simulations
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2018-07-30 17:30:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-30 17:30:09 +0800
commitd42ce0f2c1b52e26cce475e411d97165fb975577 (patch)
tree03043c37becf49145b23f4824f563e3443335698 /p2p/simulations
parent273c7a9dc4e8961e96e51bd8274436ff983a21ef (diff)
downloadgo-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.gz
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.zst
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.zip
all: simplify switches (#17267)
* all: simplify switches * silly mistake
Diffstat (limited to 'p2p/simulations')
-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