Skip to content

Commit

Permalink
fix: async issues
Browse files Browse the repository at this point in the history
Ok. So, last update broke when multiple people connected because the writelock wasn't being re-set to 0. Hopefully this design keeps everything in sync and doesn't crash.
  • Loading branch information
TGRHavoc committed May 17, 2019
1 parent 3e250ee commit f51e974
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 165 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -5,3 +5,6 @@ script:
notifications:
webhooks:
secure: "Fu1CjQiphlvok3BPJNFc4Xx7SP4DvZK84tItIHqCLIgF+VqiIZBkaVMtQ3ipeYMYPWTrZtHW+xdyUsTGaRkD85E+vVijAYDmBDh3ewf0nmcNLHx639cLBAttPBieH11KrICAZOMvabzhVic0cQSDcn0+V1aRsv+XMF45pLPaMwCdW9Kz/eeE7PsbNR7GWL2fxsYKsFSvaVE+lXEyOk89rOxuHJmXje794YeS0EcZPdwKQggL27mW09QObwm27PGOWeD3ngxBoZ3dR6EHDUVdlvJitH4EzbUUiHi458oddhL3HxyOjYcjsv2sGyex0+ItxAqVrgB6bWgjRhwHQWXfSC6D5+JN7icT3ZVn+X9viUwPMMht/B/knYNb/j6YbsBqtoTBR8s5DJp5r0J6Ku1wT+RW7mSEIUTwGpQO4Zd9449cZUP5/zA77HMzhmCqFSDByah6xKucKPicAxPFLYSS7wxy3qcbNXoMKSlOoZ0McL4CYjilnIhY9apJ086OvoCy5YlfzvsDTVeJLgL62j6aQNiuFsOdxkggWS/Lfwchc0joGopPKHpj5LgueQ+oQDsRKdb0EkeiWB3W3P54RqBz1UeeViVc5H4ua5DUlDU3U/gUda4TRT0T7jfGKt8uWiKiUyvWhC8OonQfJEoBTayb4g3Hilc4e12MMf+GixQ5CNo="
branches:
only:
- master
62 changes: 62 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,9 +2,71 @@ Changelog
=========


v2.2.3 (02-11-2017)
-------------------

Changes
~~~~~~~
- Update changelog. [Jordan Dalton]

Now it just shows the master build status as that's all we're building.
- Update travis.yml. [Jordan Dalton]

Hopefully this makes it only build the master branch and merge/PRs.

Fix
~~~
- Fixed async issues. [Jordan Dalton]

Ok. So, last update broke when multiple people connected because the writelock wasn't being re-set to 0. Hopefully this design keeps everything in sync and doesn't crash.


v2.2.2 (02-11-2017)
-------------------

New
~~~
- Add more null checks to the API. [Jordan Dalton]

Someone complained that they were crashing when null data was being sent to the API (specifically the `RemovePlayer`) so, I've added null checks to hopefully catch any null data being passed and not do anything with it.
- Add Discord notifications for builds. [Jordan Dalton]

Hopefully this works...
- Add build status to Readme. [Jordan Dalton]
- Add Unix configuration for building. [Jordan Dalton]
- Add CitizenFX library to source files. [Jordan Dalton]

Changes
~~~~~~~
- Update changelog. [Jordan Dalton]
- Update version.json. [Jordan Dalton]

Now it's 2.2.2

Fix
~~~
- Fixed travis webhook. [Jordan Dalton]
- Fixed post-build events being tiggered on Linux. [Jordan Dalton]

Other
~~~~~
- Merge branch 'develop' [Jordan Dalton]
- Changed CI to Travis. [Jordan Dalton]

Travis is more secure and I trust it more..
- Create .travis.yml. [Jordan Dalton]
- Changed the post-build parameters. [Jordan Dalton]
- Getting ready for Jenkins! [Jordan Dalton]
- Merge branch 'develop' [Jordan Dalton]


v2.2.1 (01-11-2017)
-------------------

Changes
~~~~~~~
- Update version and changelog. [Jordan Dalton]

Fix
~~~
- Fixed typo in README.md. [Tom Grobbe]
Expand Down
3 changes: 1 addition & 2 deletions README.md
@@ -1,7 +1,6 @@
# fivem-live_map

Master: [![Master Build](https://travis-ci.org/TGRHavoc/live_map.svg?branch=master)](https://travis-ci.org/TGRHavoc/live_map)
Develop: [![Develop Build](https://travis-ci.org/TGRHavoc/live_map.svg?branch=develop)](https://travis-ci.org/TGRHavoc/live_map)
[![Master Build](https://travis-ci.org/TGRHavoc/live_map.svg?branch=master)](https://travis-ci.org/TGRHavoc/live_map)

This is the "backend" code for the live_map addon for FiveM that is ran on the
game server.
Expand Down
2 changes: 2 additions & 0 deletions src/Live Map.sln
Expand Up @@ -8,12 +8,14 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Unix = Debug|Unix
Release|Any CPU = Release|Any CPU
Release|Unix = Release|Unix
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{15269C18-91AF-4129-8FA0-3601D1B0C6D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15269C18-91AF-4129-8FA0-3601D1B0C6D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15269C18-91AF-4129-8FA0-3601D1B0C6D2}.Debug|Unix.ActiveCfg = Debug|Any CPU
{15269C18-91AF-4129-8FA0-3601D1B0C6D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15269C18-91AF-4129-8FA0-3601D1B0C6D2}.Release|Any CPU.Build.0 = Release|Any CPU
{15269C18-91AF-4129-8FA0-3601D1B0C6D2}.Release|Unix.ActiveCfg = Release|Unix
Expand Down
6 changes: 6 additions & 0 deletions src/Live Map/Live Map.csproj
Expand Up @@ -80,6 +80,12 @@
COPY /Y "$(TargetDir)\Newtonsoft.Json.dll" "F:\fx-server\resources\live_map"
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>COPY /Y "$(TargetPath)" "F:\fx-server\resources\live_map\server"
COPY /Y "$(TargetDir)\deniszykov.WebSocketListener.dll" "F:\fx-server\resources\live_map"
COPY /Y "$(TargetDir)\Newtonsoft.Json.dll" "F:\fx-server\resources\live_map"
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
1 change: 1 addition & 0 deletions src/Live Map/LiveMap.cs
Expand Up @@ -92,6 +92,7 @@ public void OnStart(string name)
{
server.Start();
Tick += server.ListenAsync;

Tick += handler.SendWebsocketData;

}catch(Exception e)
Expand Down

0 comments on commit f51e974

Please sign in to comment.