event/ServerSocket: close only sockets that have been opened
Fixes assertion failure.
This commit is contained in:
		| @@ -98,6 +98,7 @@ public: | ||||
|  | ||||
| 	bool Open(GError **error_r); | ||||
|  | ||||
| 	using SocketMonitor::IsDefined; | ||||
| 	using SocketMonitor::Close; | ||||
|  | ||||
| 	char *ToString() const; | ||||
| @@ -286,7 +287,8 @@ void | ||||
| ServerSocket::Close() | ||||
| { | ||||
| 	for (auto &i : sockets) | ||||
| 		i.Close(); | ||||
| 		if (i.IsDefined()) | ||||
| 			i.Close(); | ||||
| } | ||||
|  | ||||
| OneServerSocket & | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann