Improvements

- add await during file recept
This commit is contained in:
Linloir 2022-10-19 00:58:12 +08:00
parent 01568cfe9b
commit 2a6dc0d97f
No known key found for this signature in database
GPG Key ID: 58EEB209A0F2C366
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/* /*
* @Author : Linloir * @Author : Linloir
* @Date : 2022-10-13 14:03:56 * @Date : 2022-10-13 14:03:56
* @LastEditTime : 2022-10-18 17:09:55 * @LastEditTime : 2022-10-19 00:37:31
* @Description : * @Description :
*/ */

View File

@ -1,7 +1,7 @@
/* /*
* @Author : Linloir * @Author : Linloir
* @Date : 2022-10-11 09:42:05 * @Date : 2022-10-11 09:42:05
* @LastEditTime : 2022-10-18 14:50:33 * @LastEditTime : 2022-10-19 00:57:05
* @Description : TCP repository * @Description : TCP repository
*/ */
@ -29,6 +29,7 @@ class TCPRepository {
try{ try{
await for(var response in _socket) { await for(var response in _socket) {
_pullResponse(response); _pullResponse(response);
await Future.delayed(const Duration(microseconds: 0));
} }
} catch(e) { } catch(e) {
_socket.close(); _socket.close();