File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
source/funkin/backend/system/net Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import hx.ws.*;
55import funkin .backend .system .net .WebSocketPacket .ServerPacketData ;
66import funkin .backend .system .Logs ;
77import haxe .Unserializer ;
8- import Type ;
8+
9+ import flixel .util .FlxTimer ;
910
1011/**
1112* Basically a Utility for HScript to use WebSockets. Adds safeguards, error handling, and logging to debug your WebSockets.
@@ -236,8 +237,11 @@ class WebSocketUtil implements IFlxDestroyable {
236237 this .onError (e );
237238 }
238239 };
239- if (this ._threadedSend ) Main .execAsync (_func );
240- else _func ();
240+ // because its already threaded.
241+ if (this ._threadedSend ) _func ();
242+ else new FlxTimer ().start (0.0001 , (tmr : FlxTimer ) -> {
243+ _func ();
244+ });
241245 }
242246
243247 private var _isClosed : Bool = false ;
You can’t perform that action at this time.
0 commit comments