Artifact
5aa53ec9640a6f180f3d6f7d9f75c1e3958a4398:
0000: 2f 2f 20 20 43 6f 70 79 72 69 67 68 74 20 32 30 // Copyright 20
0010: 30 36 2d 32 30 31 37 2c 20 4d 61 74 74 68 65 77 06-2017, Matthew
0020: 20 57 65 6c 6c 61 6e 64 2e 0a 2f 2f 20 0a 2f 2f Welland..// .//
0030: 20 54 68 69 73 20 66 69 6c 65 20 69 73 20 70 61 This file is pa
0040: 72 74 20 6f 66 20 4d 65 67 61 74 65 73 74 2e 0a rt of Megatest..
0050: 2f 2f 20 0a 2f 2f 20 20 20 20 20 4d 65 67 61 74 // .// Megat
0060: 65 73 74 20 69 73 20 66 72 65 65 20 73 6f 66 74 est is free soft
0070: 77 61 72 65 3a 20 79 6f 75 20 63 61 6e 20 72 65 ware: you can re
0080: 64 69 73 74 72 69 62 75 74 65 20 69 74 20 61 6e distribute it an
0090: 64 2f 6f 72 20 6d 6f 64 69 66 79 0a 2f 2f 20 20 d/or modify.//
00a0: 20 20 20 69 74 20 75 6e 64 65 72 20 74 68 65 20 it under the
00b0: 74 65 72 6d 73 20 6f 66 20 74 68 65 20 47 4e 55 terms of the GNU
00c0: 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 General Public
00d0: 4c 69 63 65 6e 73 65 20 61 73 20 70 75 62 6c 69 License as publi
00e0: 73 68 65 64 20 62 79 0a 2f 2f 20 20 20 20 20 74 shed by.// t
00f0: 68 65 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 he Free Software
0100: 20 46 6f 75 6e 64 61 74 69 6f 6e 2c 20 65 69 74 Foundation, eit
0110: 68 65 72 20 76 65 72 73 69 6f 6e 20 33 20 6f 66 her version 3 of
0120: 20 74 68 65 20 4c 69 63 65 6e 73 65 2c 20 6f 72 the License, or
0130: 0a 2f 2f 20 20 20 20 20 28 61 74 20 79 6f 75 72 .// (at your
0140: 20 6f 70 74 69 6f 6e 29 20 61 6e 79 20 6c 61 74 option) any lat
0150: 65 72 20 76 65 72 73 69 6f 6e 2e 0a 2f 2f 20 0a er version..// .
0160: 2f 2f 20 20 20 20 20 4d 65 67 61 74 65 73 74 20 // Megatest
0170: 69 73 20 64 69 73 74 72 69 62 75 74 65 64 20 69 is distributed i
0180: 6e 20 74 68 65 20 68 6f 70 65 20 74 68 61 74 20 n the hope that
0190: 69 74 20 77 69 6c 6c 20 62 65 20 75 73 65 66 75 it will be usefu
01a0: 6c 2c 0a 2f 2f 20 20 20 20 20 62 75 74 20 57 49 l,.// but WI
01b0: 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52 41 4e THOUT ANY WARRAN
01c0: 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76 65 6e TY; without even
01d0: 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77 61 72 the implied war
01e0: 72 61 6e 74 79 20 6f 66 0a 2f 2f 20 20 20 20 20 ranty of.//
01f0: 4d 45 52 43 48 41 4e 54 41 42 49 4c 49 54 59 20 MERCHANTABILITY
0200: 6f 72 20 46 49 54 4e 45 53 53 20 46 4f 52 20 41 or FITNESS FOR A
0210: 20 50 41 52 54 49 43 55 4c 41 52 20 50 55 52 50 PARTICULAR PURP
0220: 4f 53 45 2e 20 20 53 65 65 20 74 68 65 0a 2f 2f OSE. See the.//
0230: 20 20 20 20 20 47 4e 55 20 47 65 6e 65 72 61 6c GNU General
0240: 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 Public License
0250: 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 for more details
0260: 2e 0a 2f 2f 20 0a 2f 2f 20 20 20 20 20 59 6f 75 ..// .// You
0270: 20 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63 should have rec
0280: 65 69 76 65 64 20 61 20 63 6f 70 79 20 6f 66 20 eived a copy of
0290: 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 the GNU General
02a0: 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 0a 2f Public License./
02b0: 2f 20 20 20 20 20 61 6c 6f 6e 67 20 77 69 74 68 / along with
02c0: 20 4d 65 67 61 74 65 73 74 2e 20 20 49 66 20 6e Megatest. If n
02d0: 6f 74 2c 20 73 65 65 20 3c 68 74 74 70 3a 2f 2f ot, see <http://
02e0: 77 77 77 2e 67 6e 75 2e 6f 72 67 2f 6c 69 63 65 www.gnu.org/lice
02f0: 6e 73 65 73 2f 3e 2e 0a 64 69 67 72 61 70 68 20 nses/>..digraph
0300: 47 20 7b 0a 0a 20 20 20 20 20 20 20 20 6c 61 62 G {.. lab
0310: 65 6c 20 3d 20 22 53 65 72 76 65 72 20 53 74 61 el = "Server Sta
0320: 72 74 20 53 65 71 75 65 6e 63 65 73 22 3b 0a 20 rt Sequences";.
0330: 20 20 20 20 20 20 20 63 6f 6c 6f 72 3d 62 72 6f color=bro
0340: 77 6e 3b 0a 0a 73 75 62 67 72 61 70 68 20 63 6c wn;..subgraph cl
0350: 75 73 74 65 72 5f 31 20 7b 0a 20 20 20 20 20 20 uster_1 {.
0360: 20 20 6e 6f 64 65 20 5b 73 74 79 6c 65 3d 66 69 node [style=fi
0370: 6c 6c 65 64 2c 73 68 61 70 65 3d 62 6f 78 5d 3b lled,shape=box];
0380: 0a 0a 09 6c 61 62 65 6c 3d 22 46 69 6e 64 69 6e ...label="Findin
0390: 67 20 53 65 72 76 65 72 22 3b 0a 0a 09 53 54 41 g Server";...STA
03a0: 52 54 3b 0a 20 20 20 20 20 20 20 20 48 61 76 65 RT;. Have
03b0: 53 65 72 76 20 5b 6c 61 62 65 6c 3d 22 4c 6f 6f Serv [label="Loo
03c0: 6b 20 61 74 20 2e 73 65 72 76 69 6e 66 6f 5c 6e k at .servinfo\n
03d0: 66 69 6c 65 73 20 66 6f 72 20 70 72 69 6d 65 20 files for prime
03e0: 6d 61 69 6e 22 5d 3b 20 0a 09 41 73 6b 50 72 69 main"]; ..AskPri
03f0: 6d 65 20 5b 6c 61 62 65 6c 3d 22 41 73 6b 20 50 me [label="Ask P
0400: 72 69 6d 65 20 66 6f 72 20 6d 61 69 6e 22 5d 3b rime for main"];
0410: 0a 09 50 69 6e 67 50 72 69 6d 65 20 5b 6c 61 62 ..PingPrime [lab
0420: 65 6c 3d 22 50 69 6e 67 20 50 72 69 6d 65 22 5d el="Ping Prime"]
0430: 3b 0a 09 41 73 6b 50 72 69 6d 65 20 5b 6c 61 62 ;..AskPrime [lab
0440: 65 6c 3d 22 41 73 6b 20 2e 73 65 72 76 69 6e 66 el="Ask .servinf
0450: 6f 20 70 72 69 6d 65 20 66 6f 72 20 73 65 72 76 o prime for serv
0460: 65 72 22 5d 3b 0a 09 53 74 61 72 74 53 65 72 76 er"];..StartServ
0470: 20 5b 6c 61 62 65 6c 3d 22 4c 61 75 6e 63 68 20 [label="Launch
0480: 53 65 72 76 65 72 20 50 72 6f 63 65 73 73 20 66 Server Process f
0490: 6f 72 20 6d 61 69 6e 2e 64 62 22 5d 3b 0a 0a 20 or main.db"];..
04a0: 20 20 20 20 20 09 53 54 41 52 54 20 2d 3e 20 48 .START -> H
04b0: 61 76 65 53 65 72 76 3b 0a 09 48 61 76 65 53 65 aveServ;..HaveSe
04c0: 72 76 20 2d 3e 20 50 69 6e 67 50 72 69 6d 65 3b rv -> PingPrime;
04d0: 0a 09 50 69 6e 67 50 72 69 6d 65 20 2d 3e 20 41 ..PingPrime -> A
04e0: 73 6b 50 72 69 6d 65 20 5b 6c 61 62 65 6c 3d 22 skPrime [label="
04f0: 47 6f 74 20 72 65 73 70 6f 6e 73 65 22 5d 3b 0a Got response"];.
0500: 09 50 69 6e 67 50 72 69 6d 65 20 2d 3e 20 53 74 .PingPrime -> St
0510: 61 72 74 53 65 72 76 20 5b 6c 61 62 65 6c 3d 22 artServ [label="
0520: 4e 6f 20 72 65 70 6f 6e 73 65 22 5d 3b 0a 09 48 No reponse"];..H
0530: 61 76 65 53 65 72 76 20 2d 3e 20 53 74 61 72 74 aveServ -> Start
0540: 53 65 72 76 20 5b 6c 61 62 65 6c 3d 22 4e 6f 20 Serv [label="No
0550: 66 69 6c 65 73 22 5d 3b 0a 09 53 74 61 72 74 53 files"];..StartS
0560: 65 72 76 20 2d 3e 20 22 44 65 6c 61 79 20 32 73 erv -> "Delay 2s
0570: 22 20 2d 3e 20 53 54 41 52 54 3b 0a 20 20 20 20 " -> START;.
0580: 20 20 20 20 41 73 6b 50 72 69 6d 65 20 2d 3e 20 AskPrime ->
0590: 44 4f 4e 45 3b 0a 0a 2f 2f 09 63 68 65 63 6b 5f DONE;..//.check_
05a0: 61 76 61 69 6c 61 62 6c 65 5f 71 75 65 75 65 20 available_queue
05b0: 20 20 20 20 20 20 2d 3e 20 72 65 6d 6f 76 65 5f -> remove_
05c0: 65 6e 74 72 69 65 73 5f 6f 76 65 72 5f 31 30 73 entries_over_10s
05d0: 5f 6f 6c 64 3b 0a 2f 2f 09 72 65 6d 6f 76 65 5f _old;.//.remove_
05e0: 65 6e 74 72 69 65 73 5f 6f 76 65 72 5f 31 30 73 entries_over_10s
05f0: 5f 6f 6c 64 20 2d 3e 20 73 65 74 5f 61 76 61 69 _old -> set_avai
0600: 6c 61 62 6c 65 20 5b 6c 61 62 65 6c 3d 22 6e 75 lable [label="nu
0610: 6d 5f 61 76 61 69 6c 20 3c 20 33 22 5d 3b 0a 2f m_avail < 3"];./
0620: 2f 09 72 65 6d 6f 76 65 5f 65 6e 74 72 69 65 73 /.remove_entries
0630: 5f 6f 76 65 72 5f 31 30 73 5f 6f 6c 64 20 2d 3e _over_10s_old ->
0640: 20 65 78 69 74 20 5b 6c 61 62 65 6c 3d 22 6e 75 exit [label="nu
0650: 6d 5f 61 76 61 69 6c 20 3e 20 32 22 5d 3b 0a 2f m_avail > 2"];./
0660: 2f 0a 2f 2f 09 73 65 74 5f 61 76 61 69 6c 61 62 /.//.set_availab
0670: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le
0680: 20 2d 3e 20 64 65 6c 61 79 5f 32 73 3b 0a 2f 2f -> delay_2s;.//
0690: 09 64 65 6c 61 79 5f 32 73 20 20 20 20 20 20 20 .delay_2s
06a0: 20 20 20 2d 3e 20 63 68 65 63 6b 5f 70 6c 61 63 -> check_plac
06b0: 65 5f 69 6e 5f 71 75 65 75 65 3b 0a 2f 2f 0a 2f e_in_queue;.//./
06c0: 2f 09 63 68 65 63 6b 5f 70 6c 61 63 65 5f 69 6e /.check_place_in
06d0: 5f 71 75 65 75 65 20 20 20 20 20 20 20 20 2d 3e _queue ->
06e0: 20 22 68 74 74 70 3a 74 72 61 6e 73 70 6f 72 74 "http:transport
06f0: 2d 6c 61 75 6e 63 68 22 20 5b 6c 61 62 65 6c 3d -launch" [label=
0700: 22 61 74 20 68 65 61 64 22 5d 3b 0a 2f 2f 09 63 "at head"];.//.c
0710: 68 65 63 6b 5f 70 6c 61 63 65 5f 69 6e 5f 71 75 heck_place_in_qu
0720: 65 75 65 20 20 20 20 20 20 20 20 2d 3e 20 65 78 eue -> ex
0730: 69 74 20 5b 6c 61 62 65 6c 3d 22 6e 6f 74 20 61 it [label="not a
0740: 74 20 68 65 61 64 22 5d 3b 0a 2f 2f 0a 2f 2f 09 t head"];.//.//.
0750: 22 63 6c 69 65 6e 74 3a 6c 6f 67 69 6e 22 20 20 "client:login"
0760: 20 20 20 20 20 20 20 20 20 20 20 20 2d 3e 20 22 -> "
0770: 73 65 72 76 65 72 3a 73 68 75 74 64 6f 77 6e 22 server:shutdown"
0780: 20 5b 6c 61 62 65 6c 3d 22 6c 6f 67 69 6e 20 66 [label="login f
0790: 61 69 6c 65 64 22 5d 3b 0a 2f 2f 09 22 73 65 72 ailed"];.//."ser
07a0: 76 65 72 3a 73 68 75 74 64 6f 77 6e 22 20 20 20 ver:shutdown"
07b0: 20 20 20 20 20 20 20 20 2d 3e 20 65 78 69 74 3b -> exit;
07c0: 0a 09 7d 0a 0a 09 73 75 62 67 72 61 70 68 20 63 ..}...subgraph c
07d0: 6c 75 73 74 65 72 5f 32 20 7b 0a 2f 2f 09 09 22 luster_2 {.//.."
07e0: 68 74 74 70 3a 74 72 61 6e 73 70 6f 72 74 2d 6c http:transport-l
07f0: 61 75 6e 63 68 22 20 20 20 20 20 20 20 2d 3e 20 aunch" ->
0800: 22 68 74 74 70 3a 74 72 61 6e 73 70 6f 72 74 2d "http:transport-
0810: 72 75 6e 22 3b 0a 2f 2f 09 09 22 68 74 74 70 3a run";.//.."http:
0820: 74 72 61 6e 73 70 6f 72 74 2d 6c 61 75 6e 63 68 transport-launch
0830: 22 20 20 20 20 20 20 20 2d 3e 20 22 68 74 74 70 " -> "http
0840: 3a 74 72 61 6e 73 70 6f 72 74 2d 6b 65 65 70 2d :transport-keep-
0850: 72 75 6e 6e 69 6e 67 22 3b 0a 2f 2f 0a 2f 2f 09 running";.//.//.
0860: 09 22 68 74 74 70 3a 74 72 61 6e 73 70 6f 72 74 ."http:transport
0870: 2d 6b 65 65 70 2d 72 75 6e 6e 69 6e 67 22 20 2d -keep-running" -
0880: 3e 20 22 74 65 73 74 73 20 72 75 6e 6e 69 6e 67 > "tests running
0890: 3f 22 3b 0a 2f 2f 09 09 22 74 65 73 74 73 20 72 ?";.//.."tests r
08a0: 75 6e 6e 69 6e 67 3f 22 20 20 20 20 20 20 20 20 unning?"
08b0: 20 20 20 20 20 20 2d 3e 20 22 63 6c 69 65 6e 74 -> "client
08c0: 3a 6c 6f 67 69 6e 22 20 5b 6c 61 62 65 6c 3d 79 :login" [label=y
08d0: 65 73 5d 3b 0a 2f 2f 09 09 22 74 65 73 74 73 20 es];.//.."tests
08e0: 72 75 6e 6e 69 6e 67 3f 22 20 20 20 20 20 20 20 running?"
08f0: 20 20 20 20 20 20 20 2d 3e 20 22 73 65 72 76 65 -> "serve
0900: 72 3a 73 68 75 74 64 6f 77 6e 22 20 5b 6c 61 62 r:shutdown" [lab
0910: 65 6c 3d 6e 6f 5d 3b 0a 2f 2f 09 09 22 63 6c 69 el=no];.//.."cli
0920: 65 6e 74 3a 6c 6f 67 69 6e 22 20 20 20 20 20 20 ent:login"
0930: 20 20 20 20 20 20 20 20 20 20 2d 3e 20 64 65 6c -> del
0940: 61 79 5f 35 73 20 5b 6c 61 62 65 6c 3d 22 6c 6f ay_5s [label="lo
0950: 67 69 6e 20 6f 6b 22 5d 3b 0a 09 09 64 65 6c 61 gin ok"];...dela
0960: 79 5f 35 73 20 20 20 20 20 20 20 20 20 20 20 20 y_5s
0970: 20 20 20 20 20 20 20 20 20 20 2d 3e 20 22 68 74 -> "ht
0980: 74 70 3a 74 72 61 6e 73 70 6f 72 74 2d 6b 65 65 tp:transport-kee
0990: 70 2d 72 75 6e 6e 69 6e 67 22 3b 0a 09 7d 0a 0a p-running";..}..
09a0: 09 2f 2f 20 73 74 61 72 74 5f 73 65 72 76 65 72 .// start_server
09b0: 20 2d 3e 20 22 73 65 72 76 65 72 5f 72 75 6e 6e -> "server_runn
09c0: 69 6e 67 3f 22 3b 0a 09 2f 2f 20 22 73 65 72 76 ing?";..// "serv
09d0: 65 72 5f 72 75 6e 6e 69 6e 67 3f 22 20 2d 3e 20 er_running?" ->
09e0: 73 65 74 5f 61 76 61 69 6c 61 62 6c 65 20 5b 6c set_available [l
09f0: 61 62 65 6c 3d 22 6e 6f 22 5d 3b 0a 09 2f 2f 20 abel="no"];..//
0a00: 22 73 65 72 76 65 72 5f 72 75 6e 6e 69 6e 67 3f "server_running?
0a10: 22 20 2d 3e 20 64 65 6c 61 79 5f 32 73 20 5b 6c " -> delay_2s [l
0a20: 61 62 65 6c 3d 22 79 65 73 22 5d 3b 0a 09 2f 2f abel="yes"];..//
0a30: 20 64 65 6c 61 79 5f 32 73 20 2d 3e 20 22 73 74 delay_2s -> "st
0a40: 69 6c 6c 5f 72 75 6e 6e 69 6e 67 3f 22 3b 0a 09 ill_running?";..
0a50: 2f 2f 20 22 73 74 69 6c 6c 5f 72 75 6e 6e 69 6e // "still_runnin
0a60: 67 3f 22 20 2d 3e 20 70 69 6e 67 5f 73 65 72 76 g?" -> ping_serv
0a70: 65 72 20 5b 6c 61 62 65 6c 3d 79 65 73 5d 3b 0a er [label=yes];.
0a80: 09 2f 2f 20 22 73 74 69 6c 6c 5f 72 75 6e 6e 69 .// "still_runni
0a90: 6e 67 3f 22 20 2d 3e 20 73 65 74 5f 61 76 61 69 ng?" -> set_avai
0aa0: 6c 61 62 6c 65 20 5b 6c 61 62 65 6c 3d 6e 6f 5d lable [label=no]
0ab0: 3b 0a 09 2f 2f 20 70 69 6e 67 5f 73 65 72 76 65 ;..// ping_serve
0ac0: 72 20 2d 3e 20 65 78 69 74 20 5b 6c 61 62 65 6c r -> exit [label
0ad0: 3d 61 6c 69 76 65 5d 3b 0a 09 2f 2f 20 70 69 6e =alive];..// pin
0ae0: 67 5f 73 65 72 76 65 72 20 2d 3e 20 72 65 6d 6f g_server -> remo
0af0: 76 65 5f 73 65 72 76 65 72 5f 72 65 63 6f 72 64 ve_server_record
0b00: 20 5b 6c 61 62 65 6c 3d 64 65 61 64 5d 3b 0a 09 [label=dead];..
0b10: 2f 2f 20 72 65 6d 6f 76 65 5f 73 65 72 76 65 72 // remove_server
0b20: 5f 72 65 63 6f 72 64 20 2d 3e 20 73 65 74 5f 61 _record -> set_a
0b30: 76 61 69 6c 61 62 6c 65 3b 0a 09 2f 2f 20 73 65 vailable;..// se
0b40: 74 5f 61 76 61 69 6c 61 62 6c 65 20 2d 3e 20 61 t_available -> a
0b50: 76 61 69 6c 5f 64 65 6c 61 79 20 5b 6c 61 62 65 vail_delay [labe
0b60: 6c 3d 22 64 65 6c 61 79 20 33 73 22 5d 3b 0a 09 l="delay 3s"];..
0b70: 2f 2f 20 61 76 61 69 6c 5f 64 65 6c 61 79 20 2d // avail_delay -
0b80: 3e 20 22 66 69 72 73 74 5f 69 6e 5f 71 75 65 75 > "first_in_queu
0b90: 65 3f 22 3b 0a 09 2f 2f 20 0a 09 2f 2f 20 22 66 e?";..// ..// "f
0ba0: 69 72 73 74 5f 69 6e 5f 71 75 65 75 65 3f 22 20 irst_in_queue?"
0bb0: 2d 3e 20 73 65 74 5f 72 75 6e 6e 69 6e 67 20 5b -> set_running [
0bc0: 6c 61 62 65 6c 3d 79 65 73 5d 3b 0a 09 2f 2f 20 label=yes];..//
0bd0: 73 65 74 5f 72 75 6e 6e 69 6e 67 20 2d 3e 20 67 set_running -> g
0be0: 65 74 5f 6e 65 78 74 5f 70 6f 72 74 20 2d 3e 20 et_next_port ->
0bf0: 68 61 6e 64 6c 65 5f 72 65 71 75 65 73 74 73 3b handle_requests;
0c00: 0a 09 2f 2f 20 22 66 69 72 73 74 5f 69 6e 5f 71 ..// "first_in_q
0c10: 75 65 75 65 3f 22 20 2d 3e 20 22 64 65 61 64 5f ueue?" -> "dead_
0c20: 65 6e 74 72 79 5f 69 6e 5f 71 75 65 75 65 3f 22 entry_in_queue?"
0c30: 20 5b 6c 61 62 65 6c 3d 6e 6f 5d 3b 0a 09 2f 2f [label=no];..//
0c40: 20 22 64 65 61 64 5f 65 6e 74 72 79 5f 69 6e 5f "dead_entry_in_
0c50: 71 75 65 75 65 3f 22 20 2d 3e 20 22 73 65 72 76 queue?" -> "serv
0c60: 65 72 5f 72 75 6e 6e 69 6e 67 3f 22 20 5b 6c 61 er_running?" [la
0c70: 62 65 6c 3d 6e 6f 5d 3b 0a 09 2f 2f 20 22 64 65 bel=no];..// "de
0c80: 61 64 5f 65 6e 74 72 79 5f 69 6e 5f 71 75 65 75 ad_entry_in_queu
0c90: 65 3f 22 20 2d 3e 20 22 72 65 6d 6f 76 65 5f 64 e?" -> "remove_d
0ca0: 65 61 64 5f 65 6e 74 72 69 65 73 22 20 5b 6c 61 ead_entries" [la
0cb0: 62 65 6c 3d 79 65 73 5d 3b 0a 09 2f 2f 20 72 65 bel=yes];..// re
0cc0: 6d 6f 76 65 5f 64 65 61 64 5f 65 6e 74 72 69 65 move_dead_entrie
0cd0: 73 20 2d 3e 20 22 73 65 72 76 65 72 5f 72 75 6e s -> "server_run
0ce0: 6e 69 6e 67 3f 22 3b 0a 09 2f 2f 20 0a 09 2f 2f ning?";..// ..//
0cf0: 20 68 61 6e 64 6c 65 5f 72 65 71 75 65 73 74 73 handle_requests
0d00: 20 2d 3e 20 73 74 61 72 74 5f 73 68 75 74 64 6f -> start_shutdo
0d10: 77 6e 20 5b 6c 61 62 65 6c 3d 22 6e 6f 20 74 72 wn [label="no tr
0d20: 61 66 66 69 63 5c 6e 6e 6f 20 72 75 6e 6e 69 6e affic\nno runnin
0d30: 67 20 74 65 73 74 73 22 5d 3b 0a 09 2f 2f 20 68 g tests"];..// h
0d40: 61 6e 64 6c 65 5f 72 65 71 75 65 73 74 73 20 2d andle_requests -
0d50: 3e 20 73 68 75 74 64 6f 77 6e 5f 72 65 71 75 65 > shutdown_reque
0d60: 73 74 3b 0a 09 2f 2f 20 73 74 61 72 74 5f 73 68 st;..// start_sh
0d70: 75 74 64 6f 77 6e 20 2d 3e 20 73 68 75 74 64 6f utdown -> shutdo
0d80: 77 6e 5f 64 65 6c 61 79 3b 0a 09 2f 2f 20 73 68 wn_delay;..// sh
0d90: 75 74 64 6f 77 6e 5f 72 65 71 75 65 73 74 20 2d utdown_request -
0da0: 3e 20 73 68 75 74 64 6f 77 6e 5f 64 65 6c 61 79 > shutdown_delay
0db0: 3b 0a 09 2f 2f 20 73 68 75 74 64 6f 77 6e 5f 64 ;..// shutdown_d
0dc0: 65 6c 61 79 20 2d 3e 20 65 78 69 74 3b 0a 09 0a elay -> exit;...
0dd0: 20 20 20 20 7d 0a }.