Commit Graph

80 Commits

Author SHA1 Message Date
CyberKitsune
d742acf308 Minimize blocking in Filesystem.getCachedDiskUsage (#53) 2020-08-31 20:27:41 -07:00
Dane Everitt
4d3a860604 Use environment namespace for power state, don't duplicate them across server 2020-08-19 18:58:48 -07:00
Dane Everitt
cc52954a2a Refactor environment handling logic to separate a server from the environment handler itself
This change makes the environment handling logic execute independent of the server itself and should make it much easier for people to contribute changes and additional environment handlers down the road without polluting the server object even more.

There is still a lot of work to do on this front to make things easier to work with, and there are some questionable design decisions at play I'm sure.

Welcome to additional modifications and cleanup to make this code easier to reason about and work with.
2020-08-10 21:38:42 -07:00
Dane Everitt
177aa8e436 Refactor power handling logic to be more robust and able to handle spam clicking and duplicate power actions 2020-08-01 15:20:39 -07:00
Dane Everitt
da26b4c5c7 Merge pull request #41 from pterodactyl/fix/race-1
Fix a possible race condition when Unsubscribing from the EventBus
2020-07-31 20:11:21 -07:00
Matthew Penner
b811d2474e Add the ability to define additional allowed origins 2020-07-31 16:19:09 -06:00
Matthew Penner
5036077152 Hopefully fix a possible race condition when Unsubscribing from the EventBus while an event is being Published 2020-07-29 23:18:11 -06:00
Dane Everitt
7f9ec4402a Add emitters for install started/stopped 2020-07-29 21:39:27 -07:00
Dane Everitt
f0d6f67c6b Fix memory leak with websocket not removing unused listeners 2020-07-29 21:39:17 -07:00
Dane Everitt
0cbaad5c72 Completely re-work the server configuration to be separated out better 2020-07-19 16:27:55 -07:00
Dane Everitt
a00288aa64 Require a lock on the restart process to avoid double restarts causing unexpected behavior 2020-07-18 16:46:41 -07:00
Dane Everitt
8315ff8ae1 Misc mutex locking things to avoid data races 2020-07-18 16:03:25 -07:00
Dane Everitt
21303dc517 Address race conditions when booting a server process 2020-07-18 10:10:34 -07:00
Dane Everitt
65b1b96b06 Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2020-06-13 10:26:37 -07:00
Dane Everitt
198a22f446 Replace even more zap occurences 2020-06-13 10:26:35 -07:00
Matthew Penner
5c2686fc6d Fix multiple server status messages 2020-06-10 15:00:59 -06:00
Dane Everitt
62e5547c6d Merge pull request #32 from pterodactyl/issue/1796
Send disk usage when server is offline
2020-05-31 10:54:21 -07:00
Dane Everitt
82ffb9804d Don't lock up websocket when sending error json; ref pterodactyl/panel#2076 2020-05-28 19:52:47 -07:00
Matthew Penner
74097cc4ad Fix sending status event to all subscribers, send disk usage when server is offline 2020-05-22 11:01:27 -06:00
Dane Everitt
151b00de23 Unused variable 2020-04-25 18:20:49 -07:00
Dane Everitt
dbe403ef6e Update websocket permissions 2020-04-17 10:21:33 -07:00
Dane Everitt
03045c94be Better race condition prevention 2020-04-10 18:22:18 -07:00
Dane Everitt
c57708d1e0 Merge pull request #20 from matthewpi/issues/1899
Improved server loading
2020-04-10 17:37:45 -07:00
Dane Everitt
28214ef0ea Use a RWMutex so we don't block simultaneous reads 2020-04-10 17:21:55 -07:00
Dane Everitt
e91dd84279 Fix race condition warnings when attempting to work with JWT data in the websocket 2020-04-10 17:06:59 -07:00
Matthew Penner
28c8f3f400 Add the ability to fetch all servers, fix cpu usage leak again.. 2020-04-10 15:39:07 -06:00
Dane Everitt
33875105b6 Fix topic handling for websocket with namespace 2020-04-06 21:22:43 -07:00
Dane Everitt
45d441ac32 Check permissions when performing websocket actions 2020-04-06 21:03:39 -07:00
Dane Everitt
ccbb119948 Better core logic for JWT; supports a more generic structure 2020-04-05 18:44:16 -07:00
Dane Everitt
cf2ef1a173 Port most of the HTTP code over to gin 2020-04-05 18:00:33 -07:00