ARTICLE AD BOX
I am working for trading platform development using swiftUI and urlsession, URLSessionWebSocketTask, and background&foreground network monitor including wifi/mobile internet. Sometimes app doesn’t reconnect from minimize and reopen or auto network switch or manual network switch. It is connected websocket and intiated. and websocket login is working but sometimes coming not data receiving from server with no error.After websocket logged in done, as you can see in following log, data come and need to receive.I am working to fix this during past 11days but not figured out.
12:27:01.610 PM TradingApp: Application initializing... 12:27:01.612 PM TradingApp: State Store initialized 12:27:01.612 PM TradingApp: Language preference applied: en 12:27:01.612 PM Restored last fragment: quotesFragment, selected tab: 0 12:27:01.612 PM Network status changed to: Optional("wifi") 12:27:01.612 PM navigate: initial 12:27:01.612 PM TradingApp: Application initialization complete 12:27:01.615 PM TradingApp: MainTabView appeared 12:27:01.617 PM TradingApp: InitialView appeared 12:27:01.623 PM Checking for app updates from: https://.......... 12:27:01.624 PM TradingApp: App entered foreground 12:27:01.624 PM Failed to restart with new account 12:27:01.636 PM App is up to date. Current version: 1.2.3 12:27:02.847 PM TradingApp: Navigating to Existing Account Login 12:27:02.847 PM navigate: brokerSearch(query: nil) 12:27:02.848 PM Fetching brokers from: http://......../brokers 12:27:03.171 PM Brokers fetched and cached: 55 12:27:03.211 PM Success to fetch brokers: 55 12:27:03.212 PM Loading broker logo from: http://......./icon/2.png 12:27:03.530 PM Broker logo loaded from primary: 2 12:27:09.467 PM TradingApp: App entered background 12:27:09.468 PM disconnect() called 12:27:11.845 PM Network status changed to: Optional("wifi") 12:27:12.009 PM Network status changed to: Optional("cellular") 12:27:12.171 PM Network status changed to: Optional("cellular") 12:27:12.599 PM TradingApp: App entered foreground 12:27:12.600 PM Failed to restart with new account 12:27:13.772 PM TradingApp: App entered background 12:27:13.772 PM disconnect() called 12:27:15.519 PM TradingApp: App entered foreground 12:27:15.519 PM Failed to restart with new account 12:27:16.867 PM Loading broker logo from: http://...../icon/1.png 12:27:17.265 PM Broker logo loaded from primary: 1 12:27:17.802 PM navigate: login(broker: Optional(Trading.Broker)) 12:27:17.805 PM TradingApp: LoginView appeared 12:27:17.805 PM Returning cached brokers 12:27:17.808 PM Brokers loaded: 55 12:27:26.397 PM TradingApp: Connecting with login credentials 12:27:26.397 PM Login initiated for account: 2004 on broker:1st broker company 12:27:27.451 PM 1000ms delay passed - attempting WebSocket connection 12:27:27.452 PM Initiating WebSocket connection for account: 2004 on broker:1st broker company 12:27:27.453 PM Server: server_address 12:27:27.461 PM restartWithNewAccount() function called 12:27:27.463 PM Login credentials set for: 2004 @ server_address 12:27:27.463 PM connect() called 12:27:27.463 PM Network connecting 12:27:27.463 PM WebSocket connection initiated 12:27:27.464 PM WebSocket.restartWithNewAccount() called successfully 12:27:27.574 PM Network status changed to: Optional("cellular") 12:27:28.248 PM WebSocket connected 12:27:28.250 PM receive() called 12:27:28.264 PM sendLogin() called 12:27:28.270 PM Message sent: {"type":5,"password":"123456789","id":2004,"req_code":1} 12:27:28.271 PM Login request sent for: 2004 12:27:28.583 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368662.3281036557,"freeMargin":1343603.8656036558,"group":"JIN","g 12:27:28.597 PM Parsed message with res_code: 1 12:27:28.597 PM Handling LOGIN response (res_code: 1) 12:27:28.598 PM handleLoginResponse called: state=1 12:27:28.598 PM WebSocket login successful. Client: test_account 12:27:28.599 PM succeed to login with 2004 12:27:28.599 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.670699999999925,"r_mar 12:27:28.599 PM Parsed message with res_code: 4 12:27:28.600 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.670699999999925,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"i 12:27:28.741 PM WebSocket authentication successful - navigating to home 12:27:28.741 PM TradingApp: MainTabView appeared 12:27:28.741 PM Loading broker logo from: http://...../icon/1.png 12:27:29.286 PM TradingApp: LoginView disappeared 12:27:29.321 PM Broker logo loaded from primary: 1 12:27:29.533 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:29.572 PM Parsed message with res_code: 8 12:27:29.849 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539248} 12:27:29.850 PM Parsed message with res_code: 6 12:27:29.850 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539248} 12:27:30.335 PM TradingApp: App entered background 12:27:30.335 PM disconnect() called 12:27:30.335 PM Network disconnected 12:27:30.416 PM WebSocket disconnected 12:27:31.369 PM Network status changed to: Optional("cellular") 12:27:32.240 PM TradingApp: App entered background 12:27:32.494 PM TradingApp: App entered foreground 12:27:32.495 PM restartWithNewAccount() function called 12:27:32.496 PM Login credentials set for: 2004 @ server_address 12:27:32.497 PM connect() called 12:27:32.497 PM Network connecting 12:27:32.497 PM WebSocket connection initiated 12:27:33.193 PM WebSocket connected 12:27:33.194 PM receive() called 12:27:33.214 PM sendLogin() called 12:27:33.215 PM Message sent: {"password":"123456789","type":5,"req_code":1,"id":2004} 12:27:33.215 PM Login request sent for: 2004 12:27:33.536 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368681.2281036556,"freeMargin":1343622.7656036557,"group":"JIN","g 12:27:33.561 PM Parsed message with res_code: 1 12:27:33.562 PM Handling LOGIN response (res_code: 1) 12:27:33.562 PM handleLoginResponse called: state=1 12:27:33.562 PM WebSocket login successful. Client: test_account 12:27:33.563 PM succeed to login with 2004 12:27:33.564 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.68959999999992,"r_marg 12:27:33.564 PM Parsed message with res_code: 4 12:27:33.564 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.68959999999992,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"iO 12:27:33.564 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539253} 12:27:33.564 PM Parsed message with res_code: 6 12:27:33.564 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539253} 12:27:34.502 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:34.558 PM Parsed message with res_code: 8 12:27:35.053 PM TradingApp: App entered background 12:27:35.056 PM disconnect() called 12:27:35.057 PM Network disconnected 12:27:35.059 PM WebSocket disconnected 12:27:36.890 PM TradingApp: App entered background 12:27:37.146 PM TradingApp: App entered foreground 12:27:37.148 PM restartWithNewAccount() function called 12:27:37.148 PM Login credentials set for: 2004 @ server_address 12:27:37.149 PM connect() called 12:27:37.149 PM Network connecting 12:27:37.150 PM WebSocket connection initiated 12:27:37.823 PM WebSocket connected 12:27:37.824 PM receive() called 12:27:37.848 PM sendLogin() called 12:27:37.849 PM Message sent: {"type":5,"password":"123456789","id":2004,"req_code":1} 12:27:37.849 PM Login request sent for: 2004 12:27:38.170 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368762.8281036557,"freeMargin":1343704.3656036558,"group":"JIN","g 12:27:38.197 PM Parsed message with res_code: 1 12:27:38.198 PM Handling LOGIN response (res_code: 1) 12:27:38.198 PM handleLoginResponse called: state=1 12:27:38.198 PM WebSocket login successful. Client: test_account 12:27:38.198 PM succeed to login with 2004 12:27:38.199 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.771199999999958,"r_mar 12:27:38.199 PM Parsed message with res_code: 4 12:27:38.199 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.771199999999958,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"i 12:27:38.199 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539257} 12:27:38.199 PM Parsed message with res_code: 6 12:27:38.200 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539257} 12:27:39.184 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:39.237 PM Parsed message with res_code: 8 12:27:40.494 PM TradingApp: App entered background 12:27:40.495 PM disconnect() called 12:27:40.495 PM Network disconnected 12:27:40.496 PM WebSocket disconnected 12:27:42.473 PM TradingApp: App entered background 12:27:42.727 PM TradingApp: App entered foreground 12:27:42.728 PM restartWithNewAccount() function called 12:27:42.728 PM Login credentials set for: 2004 @ server_address 12:27:42.729 PM connect() called 12:27:42.729 PM Network connecting 12:27:42.730 PM WebSocket connection initiated 12:27:43.388 PM WebSocket connected 12:27:43.389 PM receive() called 12:27:43.413 PM sendLogin() called 12:27:43.414 PM Message sent: {"req_code":1,"id":2004,"password":"123456789","type":5} 12:27:43.414 PM Login request sent for: 2004 12:27:43.737 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368851.8281036559,"freeMargin":1343793.365603656,"group":"JIN","gr 12:27:43.761 PM Parsed message with res_code: 1 12:27:43.761 PM Handling LOGIN response (res_code: 1) 12:27:43.762 PM handleLoginResponse called: state=1 12:27:43.762 PM WebSocket login successful. Client: test_account 12:27:43.762 PM succeed to login with 2004 12:27:43.763 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.860200000000042,"r_mar 12:27:43.763 PM Parsed message with res_code: 4 12:27:43.763 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.860200000000042,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"i 12:27:43.764 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539263} 12:27:43.764 PM Parsed message with res_code: 6 12:27:43.764 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539263} 12:27:44.698 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:44.747 PM Parsed message with res_code: 8 12:27:45.320 PM TradingApp: App entered background 12:27:45.320 PM disconnect() called 12:27:45.321 PM Network disconnected 12:27:45.324 PM WebSocket disconnected 12:27:46.949 PM TradingApp: App entered background 12:27:47.216 PM TradingApp: App entered foreground 12:27:47.218 PM restartWithNewAccount() function called 12:27:47.218 PM Login credentials set for: 2004 @ server_address 12:27:47.219 PM connect() called 12:27:47.219 PM Network connecting 12:27:47.220 PM WebSocket connection initiated 12:27:48.015 PM WebSocket connected 12:27:48.037 PM receive() called 12:27:48.037 PM sendLogin() called 12:27:48.038 PM Message sent: {"password":"123456789","type":5,"req_code":1,"id":2004} 12:27:48.038 PM Login request sent for: 2004 12:27:48.377 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368835.7281036559,"freeMargin":1343777.2656036559,"group":"JIN","g 12:27:48.400 PM Parsed message with res_code: 1 12:27:48.401 PM Handling LOGIN response (res_code: 1) 12:27:48.401 PM handleLoginResponse called: state=1 12:27:48.403 PM WebSocket login successful. Client: test_account 12:27:48.403 PM succeed to login with 2004 12:27:48.404 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.844100000000033,"r_mar 12:27:48.404 PM Parsed message with res_code: 4 12:27:48.404 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.844100000000033,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"i 12:27:48.404 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539268} 12:27:48.405 PM Parsed message with res_code: 6 12:27:48.405 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539268} 12:27:49.360 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:49.416 PM Parsed message with res_code: 8 12:27:50.859 PM TradingApp: App entered background 12:27:50.859 PM disconnect() called 12:27:50.860 PM Network disconnected 12:27:50.861 PM WebSocket disconnected 12:27:52.066 PM TradingApp: App entered background 12:27:52.343 PM TradingApp: App entered foreground 12:27:52.344 PM restartWithNewAccount() function called 12:27:52.345 PM Login credentials set for: 2004 @ server_address 12:27:52.346 PM connect() called 12:27:52.346 PM Network connecting 12:27:52.347 PM WebSocket connection initiated 12:27:52.996 PM WebSocket connected 12:27:53.021 PM receive() called 12:27:53.022 PM sendLogin() called 12:27:53.022 PM Message sent: {"password":"123456789","type":5,"id":2004,"req_code":1} 12:27:53.022 PM Login request sent for: 2004 12:27:53.330 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368999.2281036556,"freeMargin":1343940.7656036557,"group":"JIN","g 12:27:53.353 PM Parsed message with res_code: 1 12:27:53.353 PM Handling LOGIN response (res_code: 1) 12:27:53.354 PM handleLoginResponse called: state=1 12:27:53.354 PM WebSocket login successful. Client: test_account 12:27:53.357 PM succeed to login with 2004 12:27:53.358 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":35.007599999999947,"r_mar 12:27:53.358 PM Parsed message with res_code: 4 12:27:53.358 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":35.007599999999947,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"i 12:27:53.358 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539273} 12:27:53.358 PM Parsed message with res_code: 6 12:27:53.359 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539273} 12:27:54.305 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:54.355 PM Parsed message with res_code: 8 12:27:55.175 PM TradingApp: App entered background 12:27:55.176 PM disconnect() called 12:27:55.176 PM Network disconnected 12:27:55.178 PM WebSocket disconnected 12:27:56.625 PM TradingApp: App entered background 12:27:56.884 PM TradingApp: App entered foreground 12:27:56.885 PM restartWithNewAccount() function called 12:27:56.885 PM Login credentials set for: 2004 @ server_address 12:27:56.885 PM connect() called 12:27:56.886 PM Network connecting 12:27:56.886 PM WebSocket connection initiated 12:27:57.563 PM WebSocket connected 12:27:57.564 PM receive() called 12:27:57.588 PM sendLogin() called 12:27:57.589 PM Message sent: {"id":2004,"req_code":1,"password":"123456789","type":5} 12:27:57.589 PM Login request sent for: 2004 12:27:57.903 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368977.9281036558,"freeMargin":1343919.4656036559,"group":"JIN","g 12:27:57.926 PM Parsed message with res_code: 1 12:27:57.927 PM Handling LOGIN response (res_code: 1) 12:27:57.928 PM handleLoginResponse called: state=1 12:27:57.928 PM WebSocket login successful. Client: test_account 12:27:57.928 PM succeed to login with 2004 12:27:57.929 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.98630000000005,"r_marg 12:27:57.930 PM Parsed message with res_code: 4 12:27:57.930 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.98630000000005,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"iO 12:27:57.930 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539277} 12:27:57.930 PM Parsed message with res_code: 6 12:27:57.930 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539277} 12:27:58.863 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:27:58.907 PM Parsed message with res_code: 8 12:28:00.007 PM TradingApp: App entered background 12:28:00.007 PM disconnect() called 12:28:00.007 PM Network disconnected 12:28:00.008 PM WebSocket disconnected 12:28:01.098 PM Network status changed to: Optional("cellular") 12:28:01.231 PM TradingApp: App entered background 12:28:01.507 PM TradingApp: App entered foreground 12:28:01.509 PM restartWithNewAccount() function called 12:28:01.509 PM Login credentials set for: 2004 @ server_address 12:28:01.509 PM connect() called 12:28:01.510 PM Network connecting 12:28:01.510 PM WebSocket connection initiated 12:28:02.197 PM WebSocket connected 12:28:02.198 PM receive() called 12:28:02.219 PM sendLogin() called 12:28:02.220 PM Message sent: {"password":"123456789","id":2004,"type":5,"req_code":1} 12:28:02.220 PM Login request sent for: 2004 12:28:02.536 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368923.7281036556,"freeMargin":1343865.2656036557,"group":"JIN","g 12:28:02.560 PM Parsed message with res_code: 1 12:28:02.561 PM Handling LOGIN response (res_code: 1) 12:28:02.561 PM handleLoginResponse called: state=1 12:28:02.561 PM WebSocket login successful. Client: test_account 12:28:02.562 PM succeed to login with 2004 12:28:02.562 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.93209999999992,"r_marg 12:28:02.563 PM Parsed message with res_code: 4 12:28:02.563 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":34.93209999999992,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"iO 12:28:02.564 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539282} 12:28:02.564 PM Parsed message with res_code: 6 12:28:02.565 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539282} 12:28:03.505 PM onMessage: {"array":[{"ISIN":"","base_cur":"AUD","base_digits":2,"basis":"","c_size":100000.0,"desc":"Australian Dollar vs Canadian Dollar","digits":5,"execution 12:28:03.550 PM Parsed message with res_code: 8 12:28:04.143 PM TradingApp: App entered background 12:28:04.143 PM disconnect() called 12:28:04.143 PM Network disconnected 12:28:04.144 PM WebSocket disconnected 12:28:05.204 PM TradingApp: App entered background 12:28:05.474 PM TradingApp: App entered foreground 12:28:05.475 PM restartWithNewAccount() function called 12:28:05.476 PM Login credentials set for: 2004 @ server_address 12:28:05.476 PM connect() called 12:28:05.476 PM Network connecting 12:28:05.477 PM WebSocket connection initiated 12:28:06.134 PM WebSocket connected 12:28:06.135 PM receive() called 12:28:06.136 PM sendLogin() called 12:28:06.139 PM Message sent: {"id":2004,"password":"123456789","type":5,"req_code":1} 12:28:06.140 PM Login request sent for: 2004 12:28:06.464 PM onMessage: {"agent":2001,"balance":1349080.0,"country":"","credit":2081.0,"email":"","equity":1368995.3281036557,"freeMargin":1343936.8656036558,"group":"JIN","g 12:28:06.488 PM Parsed message with res_code: 1 12:28:06.489 PM Handling LOGIN response (res_code: 1) 12:28:06.489 PM handleLoginResponse called: state=1 12:28:06.489 PM WebSocket login successful. Client: test_account 12:28:06.490 PM succeed to login with 2004 12:28:06.490 PM onMessage: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":35.003699999999952,"r_mar 12:28:06.490 PM Parsed message with res_code: 4 12:28:06.490 PM Unknown response code: 4, raw: {"array":[{"c_price":66487.690000000002,"comment":"","csize":1.0,"digits":2,"login":2004,"price":66487.690000000002,"profit":35.003699999999952,"r_margin":664.86820000000012,"r_profit":1.0,"reason":"i 12:28:06.490 PM onMessage: {"array":[],"login":2004,"res_code":6,"server_time":1770539286} 12:28:06.491 PM Parsed message with res_code: 6 12:28:06.491 PM Unknown response code: 6, raw: {"array":[],"login":2004,"res_code":6,"server_time":1770539286} 12:28:14.133 PM TradingApp: App entered background 12:28:14.133 PM disconnect() called 12:28:14.134 PM Network disconnected 12:28:14.134 PM WebSocket disconnected 12:28:15.487 PM TradingApp: App entered background 12:28:15.748 PM TradingApp: App entered foreground 12:28:15.748 PM restartWithNewAccount() function called 12:28:15.748 PM Login credentials set for: 2004 @ server_address 12:28:15.749 PM connect() called 12:28:15.749 PM Network connecting 12:28:15.749 PM WebSocket connection initiated 12:28:18.931 PM TradingApp: App entered background 12:28:18.931 PM disconnect() called 12:28:18.932 PM Network disconnected 12:29:23.031 PM TradingApp: App entered background 12:29:23.256 PM TradingApp: App entered foreground 12:29:23.257 PM restartWithNewAccount() function called 12:29:23.257 PM Login credentials set for: 2004 @ server_address 12:29:23.257 PM connect() called 12:29:23.257 PM Network connecting 12:29:23.258 PM WebSocket connection initiated