sociomantic-tsunami / swarm

Asynchronous client/node framework library
Boost Software License 1.0
14 stars 26 forks source link

Fix merge error in previous commit #331

Closed gavin-norman-sociomantic closed 6 years ago

nemanja-boric-sociomantic commented 6 years ago
./src/swarm/neo/node/ConnectionHandler.d(484): vgc: using closure causes GC allocation
gavin-norman-sociomantic commented 6 years ago

Must be another merge error or a closure that was present in v5.0.x.

nemanja-boric-sociomantic commented 6 years ago

Yeah, I think this might be just the closure already present in v5.0.x.

nemanja-boric-sociomantic commented 6 years ago

Fix:

-            this.shared_params.get_resource_acquirer(
+            scope handle_request =
                 ( Object request_resources )
                 {
                     auto rq_handler = this.emplace!(IRequestHandler)
@@ -520,8 +520,9 @@ class ConnectionHandler : IConnectionHandler
                     this.sendSupportedStatus(connection,
                         SupportedStatus.RequestSupported);
                     rq_handler.postSupportedCodeSent();
-                }
-            );
+                };
+
+            this.shared_params.get_resource_acquirer(handle_request);
gavin-norman-sociomantic commented 6 years ago

Pushed extra commit.