[pve-devel] [PATCH qemu-server] use ReuseAddr for vncproxy

Dominik Csapak d.csapak at proxmox.com
Tue May 16 16:21:01 CEST 2017


to avoid "Socket already in use" errors, when quickly opening/closing
console sessions on the webinterface

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/API2/Qemu.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 43a5e4a..c566c4d 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1433,6 +1433,7 @@ __PACKAGE__->register_method({
 		$cmd = [@$remcmd, "/usr/sbin/qm", 'vncproxy', $vmid];
 
 		my $sock = IO::Socket::IP->new(
+		    ReuseAddr => 1,
 		    Listen => 1,
 		    LocalPort => $port,
 		    Proto => 'tcp',
-- 
2.11.0





More information about the pve-devel mailing list