Przeglądaj źródła

tools: do not start worker threads if port binding fails

Daniele Bartolini 4 lat temu
rodzic
commit
9bda411cce
2 zmienionych plików z 9 dodań i 1 usunięć
  1. 5 0
      docs/changelog.rst
  2. 4 1
      src/device/console_server.cpp

+ 5 - 0
docs/changelog.rst

@@ -5,10 +5,15 @@ Changelog
 ------
 *DD MMM YYYY*
 
+**Data Compiler**
+
+* Fixed standalone compiler never exiting when another compiler instance was running in server mode.
+
 **Tools**
 
 * Fixed opening projects from the menubar when in the welcome panel.
 * Fixed projects opened from the menubar not being added to the recent projects list.
+* Fixed deploy getting stuck.
 
 0.44.0
 ------

+ 4 - 1
src/device/console_server.cpp

@@ -164,8 +164,11 @@ ConsoleServer::ConsoleServer(Allocator& a)
 
 void ConsoleServer::listen(u16 port, bool wait)
 {
+	const BindResult br = _server.bind(port);
+	if (br.error != BindResult::SUCCESS)
+		return;
+
 	_port = port;
-	_server.bind(port);
 	_server.listen(5);
 	_active_socket_set.set(&_server);