filter message error: Error writing to socket: Broken pipe Exception: Error writing to socket: Broken pipe (Errno) from /usr/lib/crystal/core/socket.cr:82:13 in 'unbuffered_write' from /usr/lib/crystal/core/io/buffered.cr:192:5 in 'flush' from /usr/lib/crystal/core/io/buffered.cr:200:5 in 'close' from /usr/lib/crystal/core/http/server/handlers/websocket_handler.cr:44:9 in 'call' from /usr/share/crystal/app/lib/kemal/src/kemal/websocket.cr:11:7 in 'call' from /usr/share/crystal/app/lib/kemal/src/kemal/websocket_handler.cr:14:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:26:7 in 'call_next' from /usr/share/crystal/app/lib/kemal/src/kemal/static_file_handler.cr:64:9 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:26:7 in 'call_next' from /usr/share/crystal/app/lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:26:7 in 'call_next' from /usr/share/crystal/app/lib/kemal/src/kemal/log_handler.cr:8:37 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:26:7 in 'call_next' from /usr/share/crystal/app/lib/kemal/src/kemal/init_handler.cr:12:7 in 'call' from /usr/lib/crystal/core/http/server/request_processor.cr:48:11 in 'process' from /usr/lib/crystal/core/http/server/request_processor.cr:22:3 in 'process' from /usr/lib/crystal/core/http/server.cr:497:5 in 'handle_client' from /usr/lib/crystal/core/http/server.cr:463:13 in '->' from /usr/lib/crystal/core/fiber.cr:255:3 in 'run' from /usr/lib/crystal/core/fiber.cr:48:34 in '->' from ???
Signed-off-by: Wu Zhende wuzhende666@163.com --- src/monitoring/filter.cr | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/monitoring/filter.cr b/src/monitoring/filter.cr index 5d3bc8b..79af3ab 100644 --- a/src/monitoring/filter.cr +++ b/src/monitoring/filter.cr @@ -41,6 +41,9 @@ class Filter
@hash[query].each do |socket| socket.send msg.to_json + rescue e + puts "send msg failed: #{e}" + remove_filter_rule(query, socket) end end