diff --git a/source/connection/connection.d b/source/connection/connection.d index eadd2ea..430b135 100644 --- a/source/connection/connection.d +++ b/source/connection/connection.d @@ -125,6 +125,12 @@ public final class BesterConnection : Thread /* TODO: Implement error handling here and send a repsonse back (Issue: https://github.com/besterprotocol/besterd/issues/10) */ debugPrint("Error communicating with message handler"); } + finally + { + /* Always close the socket */ + handlerSocket.close(); + debugPrint("Closed UNIX domain socket to handler"); + } return response; } diff --git a/source/temp.d b/source/temp.d new file mode 100644 index 0000000..8cad182 --- /dev/null +++ b/source/temp.d @@ -0,0 +1,6 @@ + finally + { + /* Always close the socket */ + handlerSocket.close(); + debugPrint("Closed UNIX domain socket to handler"); + } \ No newline at end of file