Skip to content

Commit d7cc237

Browse files
committed
改进tcp-server关闭方式
1 parent c0f3025 commit d7cc237

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/link/tcp.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@
105105
handlers
106106
options)))
107107

108-
(defn stop-server [event-loop-groups]
109-
(doseq [^EventLoopGroup elg event-loop-groups]
110-
(.sync (.shutdownGracefully elg))))
108+
(defn stop-server [[worker-group boss-group]]
109+
(.sync (.shutdownGracefully ^EventLoopGroup boss-group))
110+
(.sync (.shutdownGracefully ^EventLoopGroup worker-group)))
111111

112112
(defn server-bootstrap
113113
"Allow multiple server instance share the same eventloop:

0 commit comments

Comments
 (0)