diff options
author | James Crayne <jim.crayne@gmail.com> | 2019-10-18 03:24:25 +0000 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-01 19:46:24 -0500 |
commit | bbe88b6faf37f3031312c7eaabaefd8d149f3e33 (patch) | |
tree | b4ad8f798ea39464895539cce13ed269e18aa9c5 /dht | |
parent | f758eeb4fffea61a10d5bb52d27bbb71830dc588 (diff) |
show bind address in thread name
Diffstat (limited to 'dht')
-rw-r--r-- | dht/src/Network/StreamServer.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dht/src/Network/StreamServer.hs b/dht/src/Network/StreamServer.hs index 1055eaad..37f8812a 100644 --- a/dht/src/Network/StreamServer.hs +++ b/dht/src/Network/StreamServer.hs | |||
@@ -128,7 +128,8 @@ streamServer cfg addrs = do | |||
128 | in foldr tryBind again addrs Nothing | 128 | in foldr tryBind again addrs Nothing |
129 | listen sock maxListenQueue | 129 | listen sock maxListenQueue |
130 | thread <- mkWeakThreadId <=< forkIO $ do | 130 | thread <- mkWeakThreadId <=< forkIO $ do |
131 | myThreadId >>= flip labelThread "StreamServer.acceptLoop" | 131 | bindaddr <- Socket.getSocketName sock |
132 | myThreadId >>= flip labelThread ("StreamServer.acceptLoop." <> bshow bindaddr) | ||
132 | acceptLoop cfg sock 0 | 133 | acceptLoop cfg sock 0 |
133 | return (ServerHandle sock thread) | 134 | return (ServerHandle sock thread) |
134 | 135 | ||