From 351e8df89f0518608a66d8f0c24b32a6fe0f1c70 Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Tue, 22 May 2018 16:43:36 -0700 Subject: [PATCH] Close sockets before exiting --- lib/thrift/binary/framed/protocol_handler.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/thrift/binary/framed/protocol_handler.ex b/lib/thrift/binary/framed/protocol_handler.ex index 409ff5cc..240c1144 100644 --- a/lib/thrift/binary/framed/protocol_handler.ex +++ b/lib/thrift/binary/framed/protocol_handler.ex @@ -90,6 +90,7 @@ defmodule Thrift.Binary.Framed.ProtocolHandler do else {:error, {:server_error, thrift_data}} -> :ok = transport.send(socket, thrift_data) + :ok = transport.close(socket) exit({:shutdown, :server_error}) {:error, {:protocol_error, reason}} ->