equal
deleted
inserted
replaced
4 |
4 |
5 import Network.Socket |
5 import Network.Socket |
6 import qualified Network |
6 import qualified Network |
7 import Control.Concurrent.STM |
7 import Control.Concurrent.STM |
8 import Control.Concurrent.Chan |
8 import Control.Concurrent.Chan |
9 import Control.Exception |
9 #if defined(NEW_EXCEPTIONS) |
|
10 import qualified Control.OldException as Exception |
|
11 #else |
|
12 import qualified Control.Exception as Exception |
|
13 #endif |
10 import System.Log.Logger |
14 import System.Log.Logger |
11 ----------------------------------- |
15 ----------------------------------- |
12 import Opts |
16 import Opts |
13 import CoreTypes |
17 import CoreTypes |
14 import OfficialServer.DBInteraction |
18 import OfficialServer.DBInteraction |
45 let serverInfo = serverInfo'{dbHost = dbHost', dbLogin = dbLogin', dbPassword = dbPassword'} |
49 let serverInfo = serverInfo'{dbHost = dbHost', dbLogin = dbLogin', dbPassword = dbPassword'} |
46 #else |
50 #else |
47 let serverInfo = serverInfo' |
51 let serverInfo = serverInfo' |
48 #endif |
52 #endif |
49 |
53 |
50 bracket |
54 Exception.bracket |
51 (Network.listenOn $ Network.PortNumber $ listenPort serverInfo) |
55 (Network.listenOn $ Network.PortNumber $ listenPort serverInfo) |
52 (sClose) |
56 (sClose) |
53 (startServer serverInfo) |
57 (startServer serverInfo) |