1
0
Fork 0
Commit Graph

16 Commits

Author SHA1 Message Date
peterbell10 13144a08e4
Enable some more clang-tidy linter checks (#4738)
* Avoid inefficient AString -> c_str() -> AString round trip

* Avoid redundant string init expressions

* Avoid unnecessary return, continue, etc.

* Add .clang-format to help with clang-tidy fix-its

* Avoid unnecessary passing by value

* Avoid unnecessary local copying

* Avoid copying in range-for loops

* Avoid over-complicated boolean expressions

* Some violations missed by my local clang-tidy

* Allow unnecessary continue statements

* Add brackets

* Another expression missed locally

* Move BindingsProcessor call into clang-tidy.sh and add space

* Fix pushd not found error

* Different grouping of CheckBlockInteractionRate
2020-05-14 22:15:35 +00:00
peterbell10 154df6b09d
Cleanup unneeded globals (#4736) 2020-05-10 16:16:38 +00:00
peterbell10 1ea36298d2
Fix cUrlClient leak (#4125)
Fixes #4040
* The TCP connection is now shutdown after OnBodyFinished
* Any open connections are closed when cNetworkSingleton::Terminate() is called.
* Removed ownership cycles in cUrlClientRequest
* Added a check to the test to ensure there are no leaks.
2018-02-20 17:08:46 +00:00
Lukas Pioch 07f25253a2 Removed unneeded includes (#3902) 2017-08-06 20:57:44 +01:00
peterbell10 759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
peterbell10 a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01:00
Mattes D ea6660721b NetworkSingleton: Fixed a throw warning in VS2017. (#3792)
Also fixed the misleading name.
2017-06-22 21:10:41 +02:00
peterbell10 035ecdc9e2 Replace evdns with getaddrinfo and getnameinfo (#3766) 2017-06-15 11:03:49 +02:00
Mattes D 1462e4f70e Self tests (#3242)
* SelfTests: Added a cEvent stress-test.

* cNetwork: Fixed startup event hang.

The original code used to hang with a ~ 1:50000 chance, because on Linux the cEvent was destroyed before its "Set()" returned.
2016-06-26 14:51:12 +01:00
Mattes D 8610083a8e cNetwork: Fixed possible hang when terminating immediately after init. 2016-06-18 13:12:12 +02:00
Tiger Wang 4315a11393 Fixed and improved restarting
Restarts are now an actual, close-as-possible to application
exit+reopen.
2015-08-20 16:15:23 +01:00
Mattes D 70d54054e3 NetworkSingleton: LibEvent thread is joined properly on server exit. 2015-02-18 22:41:22 +01:00
Mattes D 053362e604 Added network termination called at app exit.
This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor.
2015-01-27 14:53:37 +01:00
Mattes D d4682463a1 cNetwork: Fixed race conditions with lookups; proper shutdown. 2015-01-22 20:13:02 +01:00
Mattes D c0cb787c10 cNetwork: Split the main cpp file into several files. 2015-01-22 20:13:02 +01:00
Mattes D d3076a3e16 cNetwork: Split cNetworkSingleton to a separate file. 2015-01-22 20:13:00 +01:00