mirror of
https://github.com/MinecraftServerControl/mscs.git
synced 2024-11-15 06:48:16 -07:00
Merge pull request #277 from Sehnryr/time_optimisation
querySendPacket runtime optimisation
This commit is contained in:
commit
7791e7850a
2
msctl
2
msctl
@ -1822,7 +1822,7 @@ querySendPacket() {
|
||||
print map { pack ("C", hex($_)) } ($packet =~ /(..)/g);
|
||||
' -- -packet="$PACKET" >>"$WORLD_DIR/query.in"
|
||||
# Give the Query server a moment to respond.
|
||||
sleep 1
|
||||
timeout 1 sh -c "while [ ! -s '$WORLD_DIR/query.out' ]; do :; done"
|
||||
# Unpack the response packet from the query.out buffer file. There are a
|
||||
# variable amount of null bytes at the start of the response packet, so
|
||||
# find the start of the response by searching for the packet type and ID.
|
||||
|
Loading…
Reference in New Issue
Block a user